This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert wantarray.t to use strict and test.pl
[perl5.git] / t / op / yadayada.t
CommitLineData
be25f609 1#!./perl
2
3print "1..5\n";
4
5$err = "Unimplemented at $0 line " . ( __LINE__ + 2 ) . ".\n";
6
7eval { ... };
8
9print "not " unless $@ eq $err;
10print "ok 1\n";
11print "# expected: '$err'\n# received: '$@'\n" unless $@ eq $err;
12
13$err = "foo at $0 line " . ( __LINE__ + 2 ) . ".\n";
14
15eval { !!! "foo" };
16
17print "not " unless $@ eq $err;
18print "ok 2\n";
19print "# expected: '$err'\n# received: '$@'\n" unless $@ eq $err;
20
21$err = "Died at $0 line " . ( __LINE__ + 2 ) . ".\n";
22
23eval { !!! };
24
25print "not " unless $@ eq $err;
26print "ok 3\n";
27print "# expected: '$err'\n# received: '$@'\n" unless $@ eq $err;
28
29local $SIG{__WARN__} = sub { $warning = shift };
30
31$err = "bar at $0 line " . ( __LINE__ + 2 ) . ".\n";
32
33eval { ??? "bar" };
34
35print "not " unless $warning eq $err;
36print "ok 4\n";
37print "# expected: '$warning'\n# received: '$warningn" unless $warning eq $err;
38
39$err = "Warning: something's wrong at $0 line " . ( __LINE__ + 2 ) . ".\n";
40
41eval { ??? };
42
43print "not " unless $warning eq $err;
44print "ok 5\n";
45print "# expected: '$warning'\n# received: '$warningn" unless $warning eq $err;