summaryrefslogtreecommitdiffstats
path: root/tests/019/load-search.tl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/019/load-search.tl')
-rw-r--r--tests/019/load-search.tl36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/019/load-search.tl b/tests/019/load-search.tl
new file mode 100644
index 00000000..962f8bc7
--- /dev/null
+++ b/tests/019/load-search.tl
@@ -0,0 +1,36 @@
+(load "../common")
+
+(defvarl cur (dir-name *load-path*))
+
+(defun txr (. args)
+ (command-get-string `@{txr-exe-path} @{args " "}`))
+
+(mtest
+ (txr `@cur/data/a`) "a\n"
+ (txr `@cur/data/a.txr`) "a.txr\n"
+ (txr `@cur/data/a.tl`) "a.tl\n"
+ (txr `@cur/data/a.tlo`) "a.tlo\n")
+
+(mtest
+ (txr `@cur/data/b`) "b.txr\n"
+ (txr `@cur/data/b.txr`) "b.txr\n"
+ (txr `@cur/data/b.tl`) "b.tl\n"
+ (txr `@cur/data/b.tlo`) "b.tlo\n")
+
+(mtest
+ (txr `@cur/data/c`) "c.txr\n"
+ (txr `@cur/data/c.txr`) "c.txr\n"
+ (txr `@cur/data/c.tl`) "c.tl\n")
+
+(let ((*stderr* *stdnull*))
+ (mtest
+ (txr "--lisp" `@cur/data/a`) ""
+ (txr "--compiled" `@cur/data/a`) ""))
+
+(mtest
+ (txr "--lisp" `@cur/data/b`) "b.tlo\n"
+ (txr "--compiled" `@cur/data/b`) "b.tlo\n")
+
+(mtest
+ (txr "--lisp" `@cur/data/c`) "c.tl\n"
+ (txr "--compiled" `@cur/data/c`) "c.tl\n")