Skip to content

Commit ab29e7a

Browse files
committed
test that calls to non-existing routines are caught before run time
1 parent 780a83d commit ab29e7a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

integration/error-reporting.t

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 8;
4+
plan 9;
55

66
BEGIN { @*INC.push('t/spec/packages') };
77

@@ -29,7 +29,6 @@ is_run "use v6;\n\nsay 'Hello';\nsay 'a'.my_non_existent_method_6R5();",
2929
}, 'Method not found error mentions method name and line number';
3030

3131
# RT #75446
32-
#?rakudo todo 'nom regression'
3332
is_run 'use v6;
3433
sub bar {
3534
pfff();
@@ -42,6 +41,14 @@ bar()',
4241
err => all(rx/pfff/, rx/'line 3'>>/),
4342
}, 'got the right line number for nonexisting sub inside another sub';
4443

44+
is_run 'say 42; nosuchsub()',
45+
{
46+
status => { $_ != 0 },
47+
out => '',
48+
err => rx/nosuchsub/,
49+
},
50+
'non-existing subroutine is caught before run time';
51+
4552
# RT #74348
4653
{
4754
subset Even of Int where { $_ %% 2 };

0 commit comments

Comments
 (0)