tests: compatibility fix.
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>
Tue, 21 Sep 2010 18:36:23 +0200
changeset 12367 3acd5f7ab9d0
parent 12366 c01dc9087d9a
child 12368 9581d5efb6a5
tests: compatibility fix. 'touch -d *' doesn't work on Mac OS X. In order to prevent this from occuring again, a check for the case is added to 'check-code.py'.
contrib/check-code.py
tests/test-archive.t
--- a/contrib/check-code.py	Tue Sep 21 16:44:13 2010 -0500
+++ b/contrib/check-code.py	Tue Sep 21 18:36:23 2010 +0200
@@ -63,6 +63,7 @@
     (r'export.*=', "don't export and assign at once"),
     ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"),
     (r'^source\b', "don't use 'source', use '.'"),
+    (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
 ]
 
 testfilters = [
--- a/tests/test-archive.t	Tue Sep 21 16:44:13 2010 -0500
+++ b/tests/test-archive.t	Tue Sep 21 18:36:23 2010 +0200
@@ -221,7 +221,7 @@
   [255]
 old file -- date clamped to 1980
 
-  $ touch -d 1975-01-01 old
+  $ touch -t 19750101 old
   $ hg add old
   $ hg commit -m old
   $ hg archive ../old.zip