File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ files.
100
100
if ($add_Ln ) {
101
101
$leader = " use XML::Axk::L1;\n " ; # To be updated over time
102
102
} else {
103
- croak " No version (Ln) specified in file $fn " ;
103
+ croak " No language (Ln) specified in file $fn " ;
104
104
}
105
105
}
106
106
Original file line number Diff line number Diff line change 1
1
# !perl
2
2
3
- package main ;
4
-
5
3
use 5.018;
6
4
use strict;
7
5
use warnings;
@@ -21,21 +19,30 @@ sub localpath {
21
19
}
22
20
23
21
# Inline script =================================================== {{{1
24
- package main {
22
+ {
25
23
my $out = capture_stdout
26
24
{ XML::Axk::App::Main([' -e' ,' print 42' , ' --no-input' ]) };
27
25
is($out , ' 42' , ' inline script runs' );
28
26
}
29
27
30
28
# }}}1
31
29
# Script on disk ================================================== {{{1
32
- package main {
30
+ {
33
31
my $out =
34
32
capture_stdout
35
33
{ XML::Axk::App::Main([ ' -f' , localpath(' 02.axk' ), ' --no-input' ]) };
36
34
is($out , ' 1337' , ' on-disk script runs' );
37
35
}
38
36
37
+ # }}}1
38
+ # Script with no language indicator =============================== {{{1
39
+ {
40
+ eval { XML::Axk::App::Main([ ' -f' , localpath(' 02-noL.axk' ),
41
+ ' --no-input' ]) };
42
+ my $err = $@ ;
43
+ like($err , qr / No language \( Ln\) specified/ , ' detects missing Ln' );
44
+ }
45
+
39
46
# }}}1
40
47
41
48
done_testing();
You can’t perform that action at this time.
0 commit comments