Commit | Line | Data |
8990e307 |
1 | #!./perl |
2 | |
3 | print "1..16\n"; |
4 | |
5 | BEGIN { @INC = '../lib' } |
a0d0e21e |
6 | use English; |
f0f333f4 |
7 | use Config; |
8 | my $threads = $Config{'ccflags'} =~ /-DUSE_THREADS\b/; |
8990e307 |
9 | |
10 | print $PID == $$ ? "ok 1\n" : "not ok 1\n"; |
11 | |
12 | $_ = 1; |
2304df62 |
13 | print $ARG == $_ ? "ok 2\n" : "not ok 2\n"; |
8990e307 |
14 | |
15 | sub foo { |
f0f333f4 |
16 | print $ARG[0] == $_[0] || $threads ? "ok 3\n" : "not ok 3\n"; |
8990e307 |
17 | } |
18 | &foo(1); |
19 | |
2304df62 |
20 | $ARG = "ok 4\nok 5\nok 6\n"; |
8990e307 |
21 | /ok 5\n/; |
22 | print $PREMATCH, $MATCH, $POSTMATCH; |
23 | |
24 | $OFS = " "; |
25 | $ORS = "\n"; |
26 | print 'ok',7; |
27 | undef $OUTPUT_FIELD_SEPARATOR; |
28 | |
4a896658 |
29 | if ($threads) { $" = "\n" } else { $LIST_SEPARATOR = "\n" }; |
8990e307 |
30 | @foo = ("ok 8", "ok 9"); |
31 | print "@foo"; |
32 | undef $OUTPUT_RECORD_SEPARATOR; |
33 | |
a0d0e21e |
34 | eval 'NO SUCH FUNCTION'; |
4a896658 |
35 | print "ok 10\n" if $EVAL_ERROR =~ /method/ || $threads; |
8990e307 |
36 | |
37 | print $UID == $< ? "ok 11\n" : "not ok 11\n"; |
38 | print $GID == $( ? "ok 12\n" : "not ok 12\n"; |
39 | print $EUID == $> ? "ok 13\n" : "not ok 13\n"; |
40 | print $EGID == $) ? "ok 14\n" : "not ok 14\n"; |
41 | |
42 | print $PROGRAM_NAME == $0 ? "ok 15\n" : "not ok 15\n"; |
43 | print $BASETIME == $^T ? "ok 16\n" : "not ok 16\n"; |