summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/crateratests.cratera.d/bootstrap.cratera7
-rw-r--r--test/luafile.lua8
-rw-r--r--test/test_bootstrap.lua9
3 files changed, 24 insertions, 0 deletions
diff --git a/test/crateratests.cratera.d/bootstrap.cratera b/test/crateratests.cratera.d/bootstrap.cratera
new file mode 100644
index 0000000..618b0fb
--- /dev/null
+++ b/test/crateratests.cratera.d/bootstrap.cratera
@@ -0,0 +1,7 @@
+-- test that cratera can require lua modules
+
+require "test.luafile"
+
+-- also check that we do have craterapath
+
+assert(craterapath)
diff --git a/test/luafile.lua b/test/luafile.lua
new file mode 100644
index 0000000..3ec81cd
--- /dev/null
+++ b/test/luafile.lua
@@ -0,0 +1,8 @@
+-- yes, this is a very small test file and it doesn't get invoked by
+-- build.sh directly.
+--
+-- it's used to check if lua modules can still be used from cratera.
+
+print "all good"
+
+assert(not craterapath)
diff --git a/test/test_bootstrap.lua b/test/test_bootstrap.lua
new file mode 100644
index 0000000..7edad26
--- /dev/null
+++ b/test/test_bootstrap.lua
@@ -0,0 +1,9 @@
+-- test cratera.bootstrap functions
+
+local bootstrap = require "cratera.bootstrap"
+
+-- loadfile is defined in bootstrap
+assert(bootstrap.loadfile("test/tests.cratera"))
+
+-- bootstrap sets up a loader
+require "crateratests.bootstrap"