Commit | Line | Data |
8d063cd8 |
1 | #!./perl |
2 | |
b5fe5ca2 |
3 | BEGIN { |
4 | chdir 't' if -d 't'; |
5 | @INC = '../lib'; |
6 | } |
7 | |
8 | use strict 'vars'; |
43651d81 |
9 | eval 'use Errno'; |
10 | die $@ if $@ and !$ENV{PERL_CORE_MINITEST}; |
b5fe5ca2 |
11 | |
12 | print "1..19\n"; |
8d063cd8 |
13 | |
b5fe5ca2 |
14 | my $foo = 'STDOUT'; |
378cc40b |
15 | print $foo "ok 1\n"; |
16 | |
17 | print "ok 2\n","ok 3\n","ok 4\n"; |
a687059c |
18 | print STDOUT "ok 5\n"; |
8d063cd8 |
19 | |
20 | open(foo,">-"); |
21 | print foo "ok 6\n"; |
22 | |
23 | printf "ok %d\n",7; |
24 | printf("ok %d\n",8); |
25 | |
b5fe5ca2 |
26 | my @a = ("ok %d%c",9,ord("\n")); |
8d063cd8 |
27 | printf @a; |
28 | |
29 | $a[1] = 10; |
a687059c |
30 | printf STDOUT @a; |
8d063cd8 |
31 | |
32 | $, = ' '; |
33 | $\ = "\n"; |
34 | |
35 | print "ok","11"; |
378cc40b |
36 | |
b5fe5ca2 |
37 | my @x = ("ok","12\nok","13\nok"); |
38 | my @y = ("15\nok","16"); |
378cc40b |
39 | print @x,"14\nok",@y; |
009c130f |
40 | { |
41 | local $\ = "ok 17\n# null =>[\000]\nok 18\n"; |
42 | print ""; |
43 | } |
b5fe5ca2 |
44 | |
43651d81 |
45 | $\ = ''; |
46 | |
b5fe5ca2 |
47 | if (!exists &Errno::EBADF) { |
48 | print "ok 19 # skipped: no EBADF\n"; |
49 | } else { |
50 | $! = 0; |
51 | print NONEXISTENT "foo"; |
52 | print "not " if ($! != &Errno::EBADF); |
53 | print "ok 19\n"; |
54 | } |