Improved build performance

This commit is contained in:
2023-10-29 16:16:36 +01:00
parent fbe6aa80bb
commit 5fe83543fd
18 changed files with 122 additions and 120 deletions

View File

@ -7,7 +7,6 @@ import (
"git.akyoto.dev/cli/q/src/cli"
"git.akyoto.dev/cli/q/src/log"
"git.akyoto.dev/go/assert"
)
func TestMain(m *testing.M) {
@ -28,14 +27,18 @@ func TestCLI(t *testing.T) {
{[]string{"system"}, 0},
{[]string{"build", "non-existing-directory"}, 1},
{[]string{"build", "examples/hello/hello.q"}, 1},
{[]string{"build", "examples/hello", "--dry"}, 0},
{[]string{"build", "examples/hello", "--invalid"}, 2},
{[]string{"build", "examples/hello", "--dry"}, 0},
}
for _, test := range tests {
exitCode := cli.Main(test.arguments)
t.Log(test.arguments)
assert.Equal(t, exitCode, test.expectedExitCode)
exitCode := cli.Main(test.arguments)
if exitCode != test.expectedExitCode {
t.Errorf("exit code %d (expected %d)", exitCode, test.expectedExitCode)
t.FailNow()
}
}
}