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