Added a test for scripts
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-07-07 22:29:19 +02:00
parent 009472e6a8
commit a64b2d6ec3
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
3 changed files with 2 additions and 1 deletions

View file

@ -18,7 +18,7 @@ func TestExec(t *testing.T) {
assert.Equal(t, cli.Exec([]string{"build", "../../examples/hello", "--dry", "--os", "windows", "--arch", "x86"}), 0) assert.Equal(t, cli.Exec([]string{"build", "../../examples/hello", "--dry", "--os", "windows", "--arch", "x86"}), 0)
assert.Equal(t, cli.Exec([]string{"help"}), 0) assert.Equal(t, cli.Exec([]string{"help"}), 0)
assert.Equal(t, cli.Exec([]string{"run", "../../examples/hello"}), 0) assert.Equal(t, cli.Exec([]string{"run", "../../examples/hello"}), 0)
assert.Equal(t, cli.Exec([]string{"../../examples/script/script.q"}), 0) assert.Equal(t, cli.Exec([]string{"../../tests/script.q"}), 0)
} }
func TestExecErrors(t *testing.T) { func TestExecErrors(t *testing.T) {

View file

@ -5,6 +5,7 @@ import (
) )
var tests = []testRun{ var tests = []testRun{
{"script", "", "Hello\n", 0},
{"sum", "", "", 10}, {"sum", "", "", 10},
} }