Add some tests for modules

* .gitignore now ignores *.got for *anything* under the tests/ directory
* runtests.sh ignores files in the tests/ directory that have the string
  "test_import_" in them, so they are not run as tests themselves
* Add a couple of basic module functionality tests

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-10-04 11:11:46 -07:00
parent 19dd90755d
commit c176efb13a
6 changed files with 19 additions and 2 deletions

6
tests/modules.npp Normal file
View File

@@ -0,0 +1,6 @@
import "modules/test_import_directory.npp"
import test_import_local
println(test_import_local.foo)
println(test_import_local.bar)
println(test_import_local.baz)

5
tests/modules.npp.expect Normal file
View File

@@ -0,0 +1,5 @@
importing test_import_directory
importing test_import_local
1
2
3

View File

@@ -0,0 +1 @@
println("importing test_import_directory")

View File

@@ -0,0 +1,5 @@
println("importing test_import_local")
foo = 1
bar = 2
baz = 3