3 # tests for DATA filehandle operations
13 # It is important that all these tests are run via fresh_perl because
14 # that way they get written to disk in text mode and will have CR-LF
15 # line endings on Windows. Otherwise the failures related to Perl
16 # code being read in binary mode will not be observed.
18 run_multiple_progs('', \*DATA);
23 # http://rt.perl.org/rt3/Ticket/Display.html?id=28106#txn-82657
38 # http://rt.perl.org/rt3/Ticket/Display.html?id=28106#txn-83113
42 if ($line1 eq "one\n") { print "ok 1\n" } else { print "not ok 1\n" }
43 if ($line2 eq "two\n") { print "ok 2\n" } else { print "not ok 2\n" }
51 # http://rt.perl.org/rt3/Ticket/Attachment/828796/403048/perlbug.rep.txt
52 my @data_positions = tell(DATA);
55 push @data_positions, tell(DATA);
60 open(my $fh, '<', $0) or die;
63 push @fh_positions, tell($fh);
67 print "not " unless "@data_positions" eq "@fh_positions";
83 # Which package is __DATA__ in?