in_single_test.go 478 B

1234567891011121314
  1. package executor
  2. import "testing"
  3. func TestInSingleValueNoMatch(t *testing.T) {
  4. _, schema, table := newTestDB(t)
  5. e := newExec(schema, table)
  6. execMust(t, e, "CREATE TABLE unsplash_photos (id INTEGER PRIMARY KEY, file_id INTEGER)")
  7. execMust(t, e, "INSERT INTO unsplash_photos VALUES (1, 5)")
  8. res := execMust(t, e, "SELECT id, file_id FROM unsplash_photos WHERE file_id IN (0)")
  9. if res.RowCount != 0 {
  10. t.Fatalf("expected 0 rows, got %d: %v", res.RowCount, res.Rows)
  11. }
  12. }