This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[win32] Integrate mainline
[perl5.git] / t / lib / english.t
CommitLineData
8990e307
LW
1#!./perl
2
3print "1..16\n";
4
5BEGIN { @INC = '../lib' }
a0d0e21e 6use English;
f0f333f4 7use Config;
54b9620d 8my $threads = $Config{archname} =~ /-thread$/;
8990e307
LW
9
10print $PID == $$ ? "ok 1\n" : "not ok 1\n";
11
12$_ = 1;
54b9620d 13print $ARG == $_ || $threads ? "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
54b9620d
MB
20if ($threads) {
21 $_ = "ok 4\nok 5\nok 6\n";
22} else {
23 $ARG = "ok 4\nok 5\nok 6\n";
24}
8990e307
LW
25/ok 5\n/;
26print $PREMATCH, $MATCH, $POSTMATCH;
27
28$OFS = " ";
29$ORS = "\n";
30print 'ok',7;
31undef $OUTPUT_FIELD_SEPARATOR;
32
4a896658 33if ($threads) { $" = "\n" } else { $LIST_SEPARATOR = "\n" };
8990e307
LW
34@foo = ("ok 8", "ok 9");
35print "@foo";
36undef $OUTPUT_RECORD_SEPARATOR;
37
a0d0e21e 38eval 'NO SUCH FUNCTION';
4a896658 39print "ok 10\n" if $EVAL_ERROR =~ /method/ || $threads;
8990e307
LW
40
41print $UID == $< ? "ok 11\n" : "not ok 11\n";
42print $GID == $( ? "ok 12\n" : "not ok 12\n";
43print $EUID == $> ? "ok 13\n" : "not ok 13\n";
44print $EGID == $) ? "ok 14\n" : "not ok 14\n";
45
46print $PROGRAM_NAME == $0 ? "ok 15\n" : "not ok 15\n";
47print $BASETIME == $^T ? "ok 16\n" : "not ok 16\n";