This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Further ANSI changes now builds and passes (most) tests
[perl5.git] / t / lib / english.t
CommitLineData
8990e307
LW
1#!./perl
2
3print "1..16\n";
4
5BEGIN { @INC = '../lib' }
a0d0e21e 6use English;
f0f333f4
NIS
7use Config;
8my $threads = $Config{'ccflags'} =~ /-DUSE_THREADS\b/;
8990e307
LW
9
10print $PID == $$ ? "ok 1\n" : "not ok 1\n";
11
12$_ = 1;
2304df62 13print $ARG == $_ ? "ok 2\n" : "not ok 2\n";
8990e307
LW
14
15sub foo {
f0f333f4 16 print $ARG[0] == $_[0] || $threads ? "ok 3\n" : "not ok 3\n";
8990e307
LW
17}
18&foo(1);
19
2304df62 20$ARG = "ok 4\nok 5\nok 6\n";
8990e307
LW
21/ok 5\n/;
22print $PREMATCH, $MATCH, $POSTMATCH;
23
24$OFS = " ";
25$ORS = "\n";
26print 'ok',7;
27undef $OUTPUT_FIELD_SEPARATOR;
28
29$LIST_SEPARATOR = "\n";
30@foo = ("ok 8", "ok 9");
31print "@foo";
32undef $OUTPUT_RECORD_SEPARATOR;
33
a0d0e21e 34eval 'NO SUCH FUNCTION';
8990e307
LW
35print "ok 10\n" if $EVAL_ERROR =~ /method/;
36
37print $UID == $< ? "ok 11\n" : "not ok 11\n";
38print $GID == $( ? "ok 12\n" : "not ok 12\n";
39print $EUID == $> ? "ok 13\n" : "not ok 13\n";
40print $EGID == $) ? "ok 14\n" : "not ok 14\n";
41
42print $PROGRAM_NAME == $0 ? "ok 15\n" : "not ok 15\n";
43print $BASETIME == $^T ? "ok 16\n" : "not ok 16\n";