Show
Ignore:
Timestamp:
11/03/06 05:30:51 (2 years ago)
Author:
allbery_b
svk:copy_cache_prev:
41990
Message:

AUTHORS: hello, world\n :)
src/Pugs/Compat.hs: added file time tests
src/Pugs/Internals.hs, src/Pugs/Prim.hs: abstract out guts of "time" for

use in $*BASETIME and file tests

src/Pugs/Run.hs: add $*BASETIME
src/Pugs/AST.hs: document _reserved and filterUserDefinedPad; add $*BASETIME

to _reserved

src/Pugs/Prim.hs: add file time operators -M, -C, -A
src/Pugs/Prim/FileTest.hs: add implementation of file time operators
t/operators/filetest.t: correct existing file time operator tests, add a few

more, add all of them to the plan

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/operators/filetest.t

    r14516 r14599  
    99=cut 
    1010 
    11 plan 41; 
     11plan 50; 
    1212 
    1313#if $*OS eq any <MSWin32 mingw msys cygwin> { 
     
    118118my $fh = open("test_file", :w); 
    119119close $fh; 
    120 ok (-M "test_file") > 0,      "-M works"; 
    121 ok (-C "test_file") > 0,      "-C works"; 
    122 ok (-A "test_file") > 0,      "-A works"; 
     120sleep 1; # just to make sure 
     121ok (-M "test_file") < 0,      "-M works on new file"; 
     122ok (-C "test_file") < 0,      "-C works on new file"; 
     123ok (-A "test_file") < 0,      "-A works on new file"; 
    123124unlink "test_file"; 
    124125 
     126if (! -f "README") { 
     127  skip 3, "no file README"; 
     128} else { 
     129  ok (-M "README") > 0, "-M works on existing file"; 
     130  ok (-C "README") > 0, "-C works on existing file"; 
     131  ok (-A "README") > 0, "-A works on existing file"; 
     132} 
     133 
     134ok not -M "xyzzy", "-M returns undef when no file"; 
     135ok not -C "xyzzy", "-C returns undef when no file"; 
     136ok not -A "xyzzy", "-A returns undef when no file";