summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
Diffstat (limited to 't/op')
-rw-r--r--t/op/eval.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/op/eval.t b/t/op/eval.t
index 78faa8545c..5cd7f4c125 100644
--- a/t/op/eval.t
+++ b/t/op/eval.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan(tests => 121);
+plan(tests => 125);
eval 'pass();';
@@ -25,6 +25,11 @@ like($@, qr/line 2/);
print eval '$foo = /'; # this tests for a call through fatal()
like($@, qr/Search/);
+is scalar(eval '++'), undef, 'eval syntax error in scalar context';
+is scalar(eval 'die'), undef, 'eval run-time error in scalar context';
+is +()=eval '++', 0, 'eval syntax error in list context';
+is +()=eval 'die', 0, 'eval run-time error in list context';
+
is(eval '"ok 7\n";', "ok 7\n");
$foo = 5;