aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-09-30 16:34:41 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-10-01 12:15:10 +0300
commit0d3248f51515d92d5229cd5e6ef30f1f963d7a5f (patch)
treeac46bd233ebbb7df19b74e9b2ff64b56418fc8fc /tests
parent6ce929cf4fc5059f37e06312a0ec3c241dbf88ed (diff)
Rename $filesystem.path_match() to $path.match()
Diffstat (limited to 'tests')
-rw-r--r--tests/function/filesystem/testscript79
-rw-r--r--tests/function/path/testscript79
2 files changed, 79 insertions, 79 deletions
diff --git a/tests/function/filesystem/testscript b/tests/function/filesystem/testscript
index ecda10e..41d4c59 100644
--- a/tests/function/filesystem/testscript
+++ b/tests/function/filesystem/testscript
@@ -71,82 +71,3 @@
EOE
}
}
-
-: path-match
-:
-{
- : string
- :
- : Test overloads for at least one of the first two arguments being of the
- : string type.
- :
- {
- : string-string
- :
- $* <'print $path_match([string] "b", [string] "b*")' >'true'
-
- : untyped-string
- :
- $* <'print $path_match("b", [string] "b*")' >'true'
-
- : string-untyped
- :
- $* <'print $path_match([string] "b", "b*")' >'true'
-
- : path-string
- :
- $* <'print $path_match([path] "b", [string] "b*")' >'true'
- }
-
- : path
- :
- : Test overloads for at least one of the first two arguments being of the
- : path type.
- :
- {
- : path-path
- :
- $* <'print $path_match([path] "a/b", [path] "b**")' >'true'
-
- : path-path-untyped
- :
- $* <'print $path_match([path] "a/b", [path] "b**", "$src_base")' >'true'
-
- : untyped-path
- :
- $* <'print $path_match("a/b", [path] "b**")' >'true'
-
- : untyped-path-dir
- :
- $* <'print $path_match("a/b", [path] "b**", $src_base)' >'true'
-
- : path-untyped
- :
- $* <'print $path_match([path] "a/b", "b**")' >'true'
- }
-
- : untyped
- :
- : Test overloads for the first two arguments being untyped.
- :
- {
- : converted-to-strings
- :
- $* <'print $path_match("b", "b**")' >'true'
-
- : converted-to-paths-due-to
- {
- : pattern
- :
- $* <'print $path_match("a/b/", "b**/")' >'true'
-
- : entry
- :
- $* <'print $path_match("a/b", "b**")' >'true'
-
- : start-dir
- :
- $* <'print $path_match("", "s***/", "$src_base")' >'true'
- }
- }
-}
diff --git a/tests/function/path/testscript b/tests/function/path/testscript
index fb01e37..8059f05 100644
--- a/tests/function/path/testscript
+++ b/tests/function/path/testscript
@@ -107,3 +107,82 @@ p = ($cxx.target.class != 'windows' ? /../foo : 'c:/../foo');
$* <"\$path.normalize\('$p')" 2>>"EOE" != 0
error: invalid path: '$p'
EOE
+
+: path-match
+:
+{
+ : string
+ :
+ : Test overloads for at least one of the first two arguments being of the
+ : string type.
+ :
+ {
+ : string-string
+ :
+ $* <'print $path.match([string] "b", [string] "b*")' >'true'
+
+ : untyped-string
+ :
+ $* <'print $path.match("b", [string] "b*")' >'true'
+
+ : string-untyped
+ :
+ $* <'print $path.match([string] "b", "b*")' >'true'
+
+ : path-string
+ :
+ $* <'print $match([path] "b", [string] "b*")' >'true'
+ }
+
+ : path
+ :
+ : Test overloads for at least one of the first two arguments being of the
+ : path type.
+ :
+ {
+ : path-path
+ :
+ $* <'print $match([path] "a/b", [path] "b**")' >'true'
+
+ : path-untyped-untyped
+ :
+ $* <'print $match([path] "a/b", "b**", "$src_base")' >'true'
+
+ : untyped-path
+ :
+ $* <'print $match("a/b", [path] "b**")' >'true'
+
+ : untyped-path-dir
+ :
+ $* <'print $match("a/b", [path] "b**", $src_base)' >'true'
+
+ : path-untyped
+ :
+ $* <'print $match([path] "a/b", "b**")' >'true'
+ }
+
+ : untyped
+ :
+ : Test overloads for the first two arguments being untyped.
+ :
+ {
+ : converted-to-strings
+ :
+ $* <'print $path.match("b", "b**")' >'true'
+
+ : converted-to-paths-due-to
+ {
+ : pattern
+ :
+ $* <'print $path.match("a/b/", "b**/")' >'true'
+
+ : entry
+ :
+ $* <'print $path.match("a/b", "b**")' >'true'
+
+ : start-dir
+ :
+ $* <'print $path.match("", "s***/", "$src_base")' >'true'
+ }
+ }
+}