summaryrefslogtreecommitdiff
path: root/test/it_error.t
diff options
context:
space:
mode:
authorUrban Müller2023-08-28 15:04:20 +0200
committerUrban Müller2023-08-28 15:04:55 +0200
commitfaf1e994daa144fbc3dcaea30c2647266a752636 (patch)
tree89d33f9646bf69e5f36ca2d6ad7ff126d78f865d /test/it_error.t
parente70b53d3ef0991f3a09bc7fcaf070f27f2e4b83a (diff)
downloaditools-faf1e994daa144fbc3dcaea30c2647266a752636.tar.gz
itools-faf1e994daa144fbc3dcaea30c2647266a752636.tar.bz2
itools-faf1e994daa144fbc3dcaea30c2647266a752636.zip
handle inline errors, e.g. new $undefined in mail3464
Diffstat (limited to 'test/it_error.t')
-rwxr-xr-xtest/it_error.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/it_error.t b/test/it_error.t
index 522d253..46f04d3 100755
--- a/test/it_error.t
+++ b/test/it_error.t
@@ -8,7 +8,7 @@ $GLOBALS['debug_verboseerrors'] = 1;
if ($argv[1])
foo($argv[1]);
else {
- foreach (range(1, 10) as $testnum) {
+ foreach (range(1, 12) as $testnum) {
$errlines = explode("\n", it::exec('{cmd} {testnum} |& cat', ['cmd' => $argv[0], 'testnum' => $testnum]));
$expect = $expect = it::match('Expect: (.*)', $errlines[0]);
$errbody = join("\n", array_slice($errlines, 1));
@@ -45,7 +45,8 @@ function foo($testno)
case 7: expect(); $b = "hi" + 2; exit; # exception
case 8: expect(); $b = 1 / 0; exit; # exception
case 9: expect(); $a["bbb"] = 5; exit; # exception
- case 10: expect(); filemtime("/foobar"); exit; # error
- case 11: expect(); $b = $a["13th"]; exit; # error
+ case 10: expect(); $b = new $dummy; exit; # exception
+ case 11: expect(); filemtime("/foobar"); exit; # error
+ case 12: expect(); $b = $a["13th"]; exit; # error
}
}