This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Add comment for greppability
[perl5.git] / t / lib / croak / toke
CommitLineData
ca8ffed2 1__END__
5af08aed
FC
2# NAME Unterminated here-doc in string eval
3eval "<<foo"; die $@
4EXPECT
5Can't find string terminator "foo" anywhere before EOF at (eval 1) line 1.
6########
7# NAME Unterminated here-doc in s/// string eval
8eval "s//<<foo/e"; die $@
9EXPECT
10Can't find string terminator "foo" anywhere before EOF at (eval 1) line 1.
11########
20ed5f00
FC
12# NAME Unterminated qw//
13qw/
14EXPECT
15Can't find string terminator "/" anywhere before EOF at - line 1.
16########
17# NAME Unterminated q//
18qw/
19EXPECT
20Can't find string terminator "/" anywhere before EOF at - line 1.
21########
22# NAME Unterminated ''
23'
24EXPECT
25Can't find string terminator "'" anywhere before EOF at - line 1.
26########
4407f1b8
FC
27# NAME /\N{/
28/\N{/
29EXPECT
30Missing right brace on \N{} or unescaped left brace after \N at - line 1, within pattern
ca53e5d5 31Execution of - aborted due to compilation errors.
4407f1b8 32########
ca8ffed2 33# NAME Missing name in "my sub"
e7d0b801 34use feature 'lexical_subs'; my sub;
ca8ffed2 35EXPECT
e7d0b801 36The lexical_subs feature is experimental at - line 1.
ca8ffed2 37Missing name in "my sub" at - line 1.
6f2d7fc9 38########
8767b1ab 39# NAME Missing name in "our sub"
e7d0b801 40use feature 'lexical_subs'; our sub;
8767b1ab 41EXPECT
e7d0b801 42The lexical_subs feature is experimental at - line 1.
8767b1ab
FC
43Missing name in "our sub" at - line 1.
44########
45# NAME Missing name in "state sub"
e7d0b801 46use 5.01; use feature 'lexical_subs';
8767b1ab
FC
47state sub;
48EXPECT
64fbf0dd 49The lexical_subs feature is experimental at - line 2.
8767b1ab
FC
50Missing name in "state sub" at - line 2.
51########
b2e3d01a
FC
52# NAME Integer constant overloading returning undef
53use overload;
247a7f40
FC
54BEGIN { overload::constant integer => sub {}; undef *^H }
551
56EXPECT
bb4784f0 57Constant(1) unknown at - line 3, at end of line
247a7f40
FC
58Execution of - aborted due to compilation errors.
59########
60# NAME Float constant overloading returning undef
61use overload;
62BEGIN { overload::constant float => sub {}; undef *^H }
631.1
64EXPECT
bb4784f0 65Constant(1.1) unknown at - line 3, at end of line
247a7f40
FC
66Execution of - aborted due to compilation errors.
67########
68# NAME Binary constant overloading returning undef
69use overload;
70BEGIN { overload::constant binary => sub {}; undef *^H }
710x1
72EXPECT
bb4784f0 73Constant(0x1) unknown at - line 3, at end of line
247a7f40
FC
74Execution of - aborted due to compilation errors.
75########
76# NAME String constant overloading returning undef
77use overload;
78BEGIN { overload::constant q => sub {}; undef *^H }
79'1', "1$_", tr"a"", s""a"
80EXPECT
81Constant(q) unknown at - line 3, near "'1'"
82Constant(qq) unknown at - line 3, within string
83Constant(tr) unknown at - line 3, within string
84Constant(s) unknown at - line 3, within string
85Execution of - aborted due to compilation errors.
86########
87# NAME Regexp constant overloading when *^H is undefined
88use overload;
89BEGIN { overload::constant qr => sub {}; undef *^H }
90/a/, m'a'
91EXPECT
92Constant(qq) unknown at - line 3, within pattern
93Constant(q) unknown at - line 3, within pattern
94Execution of - aborted due to compilation errors.
95########
96# NAME \N{...} when charnames fails to load but without an error
d4ead2eb 97# SKIP ? exists $ENV{PERL_UNICODE} ? "Unreliable under some PERL_UNICODE settings" : 0
247a7f40
FC
98BEGIN { ++$_ for @INC{"charnames.pm","_charnames.pm"} }
99"\N{a}"
100EXPECT
101Constant(\N{a}) unknown at - line 2, within string
102Execution of - aborted due to compilation errors.
103########
104# NAME Integer constant overloading returning undef
105use overload;
b2e3d01a
FC
106BEGIN { overload::constant integer => sub {} }
1071
108EXPECT
bb4784f0 109Constant(1): Call to &{$^H{integer}} did not return a defined value at - line 3, at end of line
b2e3d01a
FC
110Execution of - aborted due to compilation errors.
111########
112# NAME Float constant overloading returning undef
113use overload;
114BEGIN { overload::constant float => sub {} }
1151.1
116EXPECT
bb4784f0 117Constant(1.1): Call to &{$^H{float}} did not return a defined value at - line 3, at end of line
b2e3d01a
FC
118Execution of - aborted due to compilation errors.
119########
120# NAME Binary constant overloading returning undef
121use overload;
122BEGIN { overload::constant binary => sub {} }
1230x1
124EXPECT
bb4784f0 125Constant(0x1): Call to &{$^H{binary}} did not return a defined value at - line 3, at end of line
b2e3d01a
FC
126Execution of - aborted due to compilation errors.
127########
128# NAME String constant overloading returning undef
129use overload;
130BEGIN { overload::constant q => sub {} }
131'1', "1$_", tr"a"", s""a"
132EXPECT
133Constant(q): Call to &{$^H{q}} did not return a defined value at - line 3, near "'1'"
134Constant(qq): Call to &{$^H{q}} did not return a defined value at - line 3, within string
135Constant(tr): Call to &{$^H{q}} did not return a defined value at - line 3, within string
136Constant(s): Call to &{$^H{q}} did not return a defined value at - line 3, within string
137Execution of - aborted due to compilation errors.
138########
139# NAME Regexp constant overloading returning undef
140use overload;
141BEGIN { overload::constant qr => sub {} }
142/a/, m'a'
143EXPECT
144Constant(qq): Call to &{$^H{qr}} did not return a defined value at - line 3, within pattern
145Constant(q): Call to &{$^H{qr}} did not return a defined value at - line 3, within pattern
146Execution of - aborted due to compilation errors.
147########
6f2d7fc9
FC
148# NAME Unterminated delimiter for here document
149<<"foo
150EXPECT
151Unterminated delimiter for here document at - line 1.