Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix last test
  • Loading branch information
kyleconroy committed Dec 5, 2023
commit 9d81df93743453f059463334a85da72c97fc9b10
1 change: 1 addition & 0 deletions internal/endtoend/case_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Exec struct {
Command string `json:"command"`
Contexts []string `json:"contexts"`
Process string `json:"process"`
OS []string `json:"os"`
Env map[string]string `json:"env"`
}

Expand Down
7 changes: 7 additions & 0 deletions internal/endtoend/endtoend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
osexec "os/exec"
"path/filepath"
"runtime"
"slices"
"strings"
"testing"
Expand Down Expand Up @@ -168,6 +169,12 @@ func TestReplay(t *testing.T) {
}
}

if len(args.OS) > 0 {
if !slices.Contains(args.OS, runtime.GOOS) {
t.Skipf("unsupported os: %s", runtime.GOOS)
}
}

opts := cmd.Options{
Env: cmd.Env{
Debug: opts.DebugFromString(args.Env["SQLCDEBUG"]),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"process": "sqlc-gen-test"
}
"process": "sqlc-gen-test",
"os": ["linux", "darwin"]
}
6 changes: 3 additions & 3 deletions internal/endtoend/testdata/syntax_errors/mysql/stderr.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# package querytest
query\from.sql:2:38: syntax error near "from where id = ?;"
query\select.sql:2:34: syntax error near "select id;"
query\typo.sql:2:8: syntax error near "selectt id, first_name from users;"
query/from.sql:2:38: syntax error near "from where id = ?;"
query/select.sql:2:34: syntax error near "select id;"
query/typo.sql:2:8: syntax error near "selectt id, first_name from users;"