diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-02 14:39:51 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-02 14:39:51 -0400 |
commit | 41c0e26f48c80835afe962c8c6a64d4cc7c18b13 (patch) | |
tree | 76873cca22420c556daa52dc1df48c369d242e77 /tests | |
parent | f9d970a0535ec3ae4aaff6842788a89b139cfdaa (diff) |
fixed including something multiple times
Diffstat (limited to 'tests')
-rw-r--r-- | tests/include.toc | 16 | ||||
-rw-r--r-- | tests/include_expected | 7 | ||||
-rw-r--r-- | tests/included.toc | 5 | ||||
-rwxr-xr-x | tests/test.sh | 1 |
4 files changed, 29 insertions, 0 deletions
diff --git a/tests/include.toc b/tests/include.toc new file mode 100644 index 0000000..dee6c16 --- /dev/null +++ b/tests/include.toc @@ -0,0 +1,16 @@ +#include "std/io.toc", io; +#include "std/io.toc", foo; +#include "std/io.toc", bar; +#include "std/io.toc", baz; +#include "std/io.toc"; +#include "included.toc", inc; + +main ::= fn() { + puts("hello"); + io.puts("hello"); + foo.puts("hello"); + bar.puts("hello"); + baz.puts("hello"); + inc.puts("hello"); + inc.foo.puts("hello"); +} diff --git a/tests/include_expected b/tests/include_expected new file mode 100644 index 0000000..5b04198 --- /dev/null +++ b/tests/include_expected @@ -0,0 +1,7 @@ +hello +hello +hello +hello +hello +hello +hello diff --git a/tests/included.toc b/tests/included.toc new file mode 100644 index 0000000..548a3e5 --- /dev/null +++ b/tests/included.toc @@ -0,0 +1,5 @@ +// included by include.toc + +#include "std/io.toc"; +#include "std/io.toc", foo; + diff --git a/tests/test.sh b/tests/test.sh index bf58042..1d01f06 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -3,6 +3,7 @@ tests='bf control_flow types +include arrs_slices ptr_arithmetic defer |