2 # Copyright (C) 2008, The Perl Foundation.
7 t/php/filestat.t - Standard Library filestat
11 % perl -I../lib pipp/t/php/filestat.t
15 Tests PHP Standard Library file
16 (implemented in F<languages/pipp/src/common/php_filestat.pir>).
18 See L<http://www.php.net/manual/en/ref.filesystem.php>.
26 use lib "$FindBin::Bin/../../lib";
28 use Test::More tests => 3;
32 unlink 'pipp/file.txt' if (-f 'pipp/file.txt');
34 language_output_is( 'Pipp', <<'CODE', <<'OUTPUT', 'file_exists()' );
36 echo file_exists('file.txt'), "\n";
42 open my $X, '>', 'pipp/file.txt';
44 print {$X} "line 1\n";
45 print {$X} "line 2\n";
46 print {$X} "line 3\n";
49 language_output_is( 'Pipp', <<'CODE', <<'OUTPUT', 'file_exists()' );
51 echo file_exists('file.txt'), "\n";
57 language_output_is( 'Pipp', <<'CODE', <<'OUTPUT', 'filesize()' );
59 echo filesize('file.txt'), "\n";
65 unlink 'pipp/file.txt' if (-f 'pipp/file.txt');
70 # cperl-indent-level: 4
73 # vim: expandtab shiftwidth=4: