From a64b2d6ec38cc814d4503ff32a1b66c009b11e47 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 7 Jul 2025 22:29:19 +0200 Subject: [PATCH] Added a test for scripts --- src/cli/Exec_test.go | 2 +- {examples/script => tests}/script.q | 0 tests/tests_test.go | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) rename {examples/script => tests}/script.q (100%) diff --git a/src/cli/Exec_test.go b/src/cli/Exec_test.go index 866ca09..ca044c2 100644 --- a/src/cli/Exec_test.go +++ b/src/cli/Exec_test.go @@ -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{"help"}), 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) { diff --git a/examples/script/script.q b/tests/script.q similarity index 100% rename from examples/script/script.q rename to tests/script.q diff --git a/tests/tests_test.go b/tests/tests_test.go index 4fb5786..67a00ab 100644 --- a/tests/tests_test.go +++ b/tests/tests_test.go @@ -5,6 +5,7 @@ import ( ) var tests = []testRun{ + {"script", "", "Hello\n", 0}, {"sum", "", "", 10}, }