[svn:parrot] r47083 - trunk/t/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Fri May 28 07:33:25 UTC 2010
Author: fperrad
Date: Fri May 28 07:33:24 2010
New Revision: 47083
URL: https://trac.parrot.org/parrot/changeset/47083
Log:
[osutils] test newer()
Modified:
trunk/t/library/osutils.t
Modified: trunk/t/library/osutils.t
==============================================================================
--- trunk/t/library/osutils.t Fri May 28 02:37:49 2010 (r47082)
+++ trunk/t/library/osutils.t Fri May 28 07:33:24 2010 (r47083)
@@ -21,11 +21,12 @@
load_bytecode 'osutils.pir'
- plan(11)
+ plan(17)
test_basename()
test_dirname()
test_catfile()
test_splitpath()
+ test_newer()
.end
.sub 'test_basename'
@@ -62,6 +63,24 @@
is(file, 'ghi.txt', "splitpath file")
.end
+.sub 'test_newer'
+ $I0 = newer('runtime/parrot/library/osutils.pbc', 'runtime/parrot/library/osutils.pir')
+ ok($I0, "newer('osutils.pbc', 'osutils.pir')")
+ $I0 = newer('runtime/parrot/library/osutils.no_file', 'runtime/parrot/library/osutils.pir')
+ nok($I0, "newer('osutils.no_file', 'osutils.pir')")
+ $I0 = newer('runtime/parrot/library/osutils.pir', 'runtime/parrot/library/osutils.pir')
+ nok($I0, "newer('osutils.pir', 'osutils.pir')")
+
+ $P0 = split ' ', 'runtime/parrot/library/osutils.pir runtime/parrot/include/stat.pasm'
+ $I0 = newer('runtime/parrot/library/osutils.pbc', $P0)
+ ok($I0, "newer('osutils.pbc', ['osutils.pir', 'stat.pasm'])")
+ $I0 = newer('runtime/parrot/library/osutils.no_file', $P0)
+ nok($I0, "newer('osutils.no_file', ['osutils.pir', 'stat.pasm'])")
+ $I0 = newer('runtime/parrot/library/osutils.pir', $P0)
+ nok($I0, "newer('osutils.pir', ['osutils.pir', 'stat.pasm'])")
+.end
+
+
# Local Variables:
# mode: pir
# fill-column: 100
More information about the parrot-commits
mailing list