diff --git a/compiler/compiler_test.go b/compiler/compiler_test.go index 2327744..cfb15e3 100644 --- a/compiler/compiler_test.go +++ b/compiler/compiler_test.go @@ -9,6 +9,13 @@ testUnit (test, 0, )} +func TestPuts (test *testing.T) { +testUnit (test, +"/test-data/data/puts", nil, +"", "hello\n", +0, +)} + func TestExitCode13 (test *testing.T) { testUnit (test, "/test-data/data/exit-code-13", nil, diff --git a/compiler/test-data/data/puts/fspl.mod b/compiler/test-data/data/puts/fspl.mod new file mode 100644 index 0000000..1335ae9 --- /dev/null +++ b/compiler/test-data/data/puts/fspl.mod @@ -0,0 +1,2 @@ +'aaad83b9-6610-45c4-ad89-4c28cf3a3b26' ++ 'cstdio' diff --git a/compiler/test-data/data/puts/main.fspl b/compiler/test-data/data/puts/main.fspl new file mode 100644 index 0000000..dc396b9 --- /dev/null +++ b/compiler/test-data/data/puts/main.fspl @@ -0,0 +1,4 @@ +[main]: I32 'main' = { + cstdio::[puts 'hello'] + 0 +}