aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-11-05 14:58:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-11-05 15:04:54 +0200
commitcf18da3ac461087ccffd31222dbe4fa2e6428d56 (patch)
tree987f9c11a25d14930ff7146f1a52b7e698a17391
parent55ddc71fd801e06115ad6e33098b0eed2517daab (diff)
Fix tests
-rw-r--r--libbuild2/function+call.test.testscript6
-rw-r--r--tests/function/builtin/testscript1
-rw-r--r--tests/function/filesystem/testscript3
-rw-r--r--tests/function/install/testscript1
-rw-r--r--tests/function/path/testscript2
-rw-r--r--tests/function/regex/testscript21
6 files changed, 27 insertions, 7 deletions
diff --git a/libbuild2/function+call.test.testscript b/libbuild2/function+call.test.testscript
index 755572e..569ed80 100644
--- a/libbuild2/function+call.test.testscript
+++ b/libbuild2/function+call.test.testscript
@@ -31,14 +31,14 @@ $* <'print $variadic([bool] true, foo, bar)' >'3'
:
$* <'$fail()' 2>>EOE != 0
error: failed
-buildfile:1:2: info: while calling fail()
+ buildfile:1:2: info: while calling fail()
EOE
: fail-invalid-arg
:
$* <'$fail_arg(abc)' 2>>EOE != 0
error: invalid argument: invalid uint64 value: 'abc'
-buildfile:1:2: info: while calling fail_arg(<untyped>)
+ buildfile:1:2: info: while calling fail_arg(<untyped>)
EOE
: no-match-name
@@ -111,7 +111,7 @@ $* <'print $nullable(nonull)' >'false'
:
$* <'$dummy1([string null])' 2>>EOE != 0
error: invalid argument: null value
-buildfile:1:2: info: while calling dummy1(string)
+ buildfile:1:2: info: while calling dummy1(string)
EOE
: print-call-1-untyped
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
}