aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-10-24 16:21:23 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-10-25 13:32:09 +0300
commitcd6708644ed294a0d479dbe04caa7f0f570b80bb (patch)
tree5e0554748de15b1a11a7953fcdf3cb88216a555c /tests
parentfaf32d0bfa0451cf9ade8c1902221cf085bb7d55 (diff)
Allow concatenation of path/dir_path type to be a path pattern
Diffstat (limited to 'tests')
-rw-r--r--tests/directive/parsing.testscript2
-rw-r--r--tests/name/pattern.testscript29
2 files changed, 30 insertions, 1 deletions
diff --git a/tests/directive/parsing.testscript b/tests/directive/parsing.testscript
index 04dd054..3f180f0 100644
--- a/tests/directive/parsing.testscript
+++ b/tests/directive/parsing.testscript
@@ -1,4 +1,4 @@
-# file : tests/directive/assert.testscript
+# file : tests/directive/parsing.testscript
# license : MIT; see accompanying LICENSE file
# Test overall directive parsing.
diff --git a/tests/name/pattern.testscript b/tests/name/pattern.testscript
index 36c7b10..c1a4ce4 100644
--- a/tests/name/pattern.testscript
+++ b/tests/name/pattern.testscript
@@ -18,6 +18,35 @@ pat = '*'
print "$(pat).txt"
EOI
+: typed-concat
+:
+{
+ : dir-path
+ :
+ touch foo.txt;
+ $* <'print {$src_base/*.txt}' >/~'%.+/foo\.txt%'
+
+ : path
+ :
+ touch foo.txt;
+ $* <<EOI >/~'%.+/foo\.txt%'
+ p = [path] $src_base
+ print {$p/*.txt}
+ EOI
+
+ : string
+ :
+ touch foo.txt;
+ $* <<EOI >~'%.+/\*\.txt%'
+ p = [string] "$src_base"
+ print {$p/*.txt}
+ EOI
+
+ : not-pattern
+ :
+ $* <'print {$src_base/foo.txt}' >/~'%.+/foo\.txt%'
+}
+
: detect
:
: Test pattern_mode parsing logic.