diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-10-24 16:21:23 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-10-25 13:32:09 +0300 |
commit | cd6708644ed294a0d479dbe04caa7f0f570b80bb (patch) | |
tree | 5e0554748de15b1a11a7953fcdf3cb88216a555c /tests/name | |
parent | faf32d0bfa0451cf9ade8c1902221cf085bb7d55 (diff) |
Allow concatenation of path/dir_path type to be a path pattern
Diffstat (limited to 'tests/name')
-rw-r--r-- | tests/name/pattern.testscript | 29 |
1 files changed, 29 insertions, 0 deletions
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. |