diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-05 14:58:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-05 15:04:54 +0200 |
commit | cf18da3ac461087ccffd31222dbe4fa2e6428d56 (patch) | |
tree | 987f9c11a25d14930ff7146f1a52b7e698a17391 /tests/function | |
parent | 55ddc71fd801e06115ad6e33098b0eed2517daab (diff) |
Fix tests
Diffstat (limited to 'tests/function')
-rw-r--r-- | tests/function/builtin/testscript | 1 | ||||
-rw-r--r-- | tests/function/filesystem/testscript | 3 | ||||
-rw-r--r-- | tests/function/install/testscript | 1 | ||||
-rw-r--r-- | tests/function/path/testscript | 2 | ||||
-rw-r--r-- | tests/function/regex/testscript | 21 |
5 files changed, 24 insertions, 4 deletions
diff --git a/tests/function/builtin/testscript b/tests/function/builtin/testscript index 7b85d7b..46a7b2c 100644 --- a/tests/function/builtin/testscript +++ b/tests/function/builtin/testscript @@ -105,6 +105,7 @@ : $* <'print $getenv(a b)' 2>>EOE != 0 error: invalid argument: invalid string value: multiple names + <stdin>:1:8: info: while calling getenv(<untyped>) EOE } diff --git a/tests/function/filesystem/testscript b/tests/function/filesystem/testscript index 41d4c59..1b65d50 100644 --- a/tests/function/filesystem/testscript +++ b/tests/function/filesystem/testscript @@ -23,6 +23,7 @@ $* <'print $path_search([path] "b**/", [dir_path] ../../a)' 2>>~%EOE% != 0 %error: start directory '.+' is relative% % info: pattern '.+' is relative% + <stdin>:1:8: info: while calling path_search(path, dir_path) EOE : start-untyped @@ -33,6 +34,7 @@ : $* <'print $path_search([path] "b**/", a b)' 2>>EOE != 0 error: invalid argument: invalid dir_path value: multiple names + <stdin>:1:8: info: while calling path_search(path, <untyped>) EOE } @@ -68,6 +70,7 @@ touch b; $* <'print $path_search(a b, $src_base)' 2>>EOE != 0 error: invalid argument: invalid path value: multiple names + <stdin>:1:8: info: while calling path_search(<untyped>, dir_path) EOE } } diff --git a/tests/function/install/testscript b/tests/function/install/testscript index 99cf826..1341a1a 100644 --- a/tests/function/install/testscript +++ b/tests/function/install/testscript @@ -29,5 +29,6 @@ EOI $* <'print $install.resolve([dir_path] foo/a)' 2>>EOE != 0 error: unknown installation directory name 'foo' info: did you forget to specify config.install.foo? + <stdin>:1:8: info: while calling install.resolve(dir_path) EOE } diff --git a/tests/function/path/testscript b/tests/function/path/testscript index 8059f05..742ec21 100644 --- a/tests/function/path/testscript +++ b/tests/function/path/testscript @@ -72,6 +72,7 @@ s = ($cxx.target.class != 'windows' ? '/' : '\') : $* <'print $leaf([path] a/b/c, [dir_path] a/d)' 2>>"EOE" != 0 error: 'a/d$s' is not a prefix of 'a/b/c' + <stdin>:1:8: info: while calling leaf\(path, dir_path\) EOE } @@ -106,6 +107,7 @@ s = ($cxx.target.class != 'windows' ? '/' : '\') p = ($cxx.target.class != 'windows' ? /../foo : 'c:/../foo'); $* <"\$path.normalize\('$p')" 2>>"EOE" != 0 error: invalid path: '$p' + <stdin>:1:2: info: while calling path.normalize\(<untyped>\) EOE : path-match diff --git a/tests/function/regex/testscript b/tests/function/regex/testscript index 1fdb383..6ee4c4d 100644 --- a/tests/function/regex/testscript +++ b/tests/function/regex/testscript @@ -42,21 +42,30 @@ : multiple-names : - $* <<EOI 2>'error: invalid argument: invalid string value: multiple names' != 0 + $* <<EOI 2>>EOE != 0 print $regex.replace(foo.cxx bar.cxx, '([^.]*)', '\1.o') EOI + error: invalid argument: invalid string value: multiple names + <stdin>:1:8: info: while calling regex.replace(<untyped>, <untyped>, <untyped>) + EOE : null : - $* <<EOI 2>'error: invalid argument: null value' != 0 + $* <<EOI 2>>EOE != 0 print $regex.replace([null], '([^.]*)', '\1.o') EOI + error: invalid argument: null value + <stdin>:1:8: info: while calling regex.replace(<untyped>, <untyped>, <untyped>) + EOE : null-regex : - $* <<EOI 2>'error: invalid argument: null value' != 0 + $* <<EOI 2>>EOE != 0 print $regex.replace(foo.cxx, [null], '\1.o') EOI + error: invalid argument: null value + <stdin>:1:8: info: while calling regex.replace(<untyped>, <untyped>, <untyped>) + EOE } : no-subs @@ -104,15 +113,19 @@ : unknown : - $* <<EOI 2>"error: invalid argument: invalid flag 'unknown'" != 0 + $* <<EOI 2>>EOE != 0 print $regex.replace("foo.cxx", '(f[^.]*).*', '\1.o', unknown) EOI + error: invalid argument: invalid flag 'unknown' + <stdin>:1:8: info: while calling regex.replace(<untyped>, <untyped>, <untyped>, <untyped>) + EOE } : invalid-regex : $* <'print $regex.replace(a, "[", b)' 2>>~/EOE/ != 0 /error: invalid argument: invalid regex '\['.*/ + <stdin>:1:8: info: while calling regex.replace(<untyped>, <untyped>, <untyped>) EOE } |