From bae5a63ed738cae08c056bdfa272130029fa7ca5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 31 Mar 2022 07:17:06 -0700 Subject: Add test for loading issue. This test currently fails because when we execute an unsuffixed file like test/019/a, which exists, another file is executed instead, like test/019/a.txr. * tests/019/data/a, * tests/019/data/a.tl, * tests/019/data/a.tlo, * tests/019/data/a.txr * tests/019/data/b.tl * tests/019/data/b.tlo * tests/019/data/b.txr * tests/019/data/c.tl * tests/019/data/c.txr * tests/019/load-search.tl: New files. --- tests/019/data/a | 3 +++ tests/019/data/a.tl | 1 + tests/019/data/a.tlo | 2 ++ tests/019/data/a.txr | 3 +++ tests/019/data/b.tl | 1 + tests/019/data/b.tlo | 2 ++ tests/019/data/b.txr | 3 +++ tests/019/data/c.tl | 1 + tests/019/data/c.txr | 3 +++ tests/019/load-search.tl | 36 ++++++++++++++++++++++++++++++++++++ 10 files changed, 55 insertions(+) create mode 100755 tests/019/data/a create mode 100755 tests/019/data/a.tl create mode 100755 tests/019/data/a.tlo create mode 100755 tests/019/data/a.txr create mode 100755 tests/019/data/b.tl create mode 100755 tests/019/data/b.tlo create mode 100755 tests/019/data/b.txr create mode 100755 tests/019/data/c.tl create mode 100755 tests/019/data/c.txr create mode 100644 tests/019/load-search.tl (limited to 'tests') diff --git a/tests/019/data/a b/tests/019/data/a new file mode 100755 index 00000000..8fbed4f6 --- /dev/null +++ b/tests/019/data/a @@ -0,0 +1,3 @@ +@(output) +a +@(end) diff --git a/tests/019/data/a.tl b/tests/019/data/a.tl new file mode 100755 index 00000000..6f25fed5 --- /dev/null +++ b/tests/019/data/a.tl @@ -0,0 +1 @@ +(put-line "a.tl") diff --git a/tests/019/data/a.tlo b/tests/019/data/a.tlo new file mode 100755 index 00000000..40f39e81 --- /dev/null +++ b/tests/019/data/a.tlo @@ -0,0 +1,2 @@ +(7 0 nil) +((2 3 #b'0200012000000004 02000010' #("a.tlo") #(usr:put-line))) diff --git a/tests/019/data/a.txr b/tests/019/data/a.txr new file mode 100755 index 00000000..ceab552d --- /dev/null +++ b/tests/019/data/a.txr @@ -0,0 +1,3 @@ +@(output) +a.txr +@(end) diff --git a/tests/019/data/b.tl b/tests/019/data/b.tl new file mode 100755 index 00000000..46c6dd30 --- /dev/null +++ b/tests/019/data/b.tl @@ -0,0 +1 @@ +(put-line "b.tl") diff --git a/tests/019/data/b.tlo b/tests/019/data/b.tlo new file mode 100755 index 00000000..2f432257 --- /dev/null +++ b/tests/019/data/b.tlo @@ -0,0 +1,2 @@ +(7 0 nil) +((2 3 #b'0200012000000004 02000010' #("b.tlo") #(usr:put-line))) diff --git a/tests/019/data/b.txr b/tests/019/data/b.txr new file mode 100755 index 00000000..0b8883e0 --- /dev/null +++ b/tests/019/data/b.txr @@ -0,0 +1,3 @@ +@(output) +b.txr +@(end) diff --git a/tests/019/data/c.tl b/tests/019/data/c.tl new file mode 100755 index 00000000..b9e018ea --- /dev/null +++ b/tests/019/data/c.tl @@ -0,0 +1 @@ +(put-line "c.tl") diff --git a/tests/019/data/c.txr b/tests/019/data/c.txr new file mode 100755 index 00000000..19995e8a --- /dev/null +++ b/tests/019/data/c.txr @@ -0,0 +1,3 @@ +@(output) +c.txr +@(end) 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") -- cgit v1.2.3