changeset 15389:3bece03bf3c6 stable

tests: use md5sum.py instead of sha1sum, add check
author Matt Mackall <mpm@selenic.com>
date Mon, 31 Oct 2011 14:22:11 -0500
parents eb6c0d47c3d5
children fffe49886a51
files contrib/check-code.py tests/test-lfconvert.t
diffstat 2 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Oct 31 00:42:32 2011 +0900
+++ b/contrib/check-code.py	Mon Oct 31 14:22:11 2011 -0500
@@ -52,6 +52,7 @@
     (r'^diff.*-\w*N', "don't use 'diff -N'"),
     (r'(^| )wc[^|]*$\n(?!.*\(re\))', "filter wc output"),
     (r'head -c', "don't use 'head -c', use 'dd'"),
+    (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"),
     (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"),
     (r'printf.*\\\d\d\d', "don't use 'printf \NNN', use Python"),
     (r'printf.*\\x', "don't use printf \\x, use Python"),
--- a/tests/test-lfconvert.t	Mon Oct 31 00:42:32 2011 +0900
+++ b/tests/test-lfconvert.t	Mon Oct 31 14:22:11 2011 -0500
@@ -48,9 +48,9 @@
   normal
   $ cat sub/normal2
   alsonormal
-  $ sha1sum large sub/maybelarge.dat
-  2e000fa7e85759c7f4c254d4d9c33ef481e459a7  large
-  34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c  sub/maybelarge.dat
+  $ "$TESTDIR/md5sum.py" large sub/maybelarge.dat
+  ec87a838931d4d5d2e94a04644788a55  large
+  1276481102f218c981e0324180bafd9f  sub/maybelarge.dat
 
 "lfconvert" adds 'largefiles' to .hg/requires.
   $ cat .hg/requires
@@ -74,8 +74,8 @@
   $ echo blah >> normal3
   $ echo blah >> sub/normal2
   $ echo blah >> sub/maybelarge.dat
-  $ sha1sum sub/maybelarge.dat
-  76236b6a2c6102826c61af4297dd738fb3b1de38  sub/maybelarge.dat
+  $ "$TESTDIR/md5sum.py" sub/maybelarge.dat
+  1dd0b99ff80e19cff409702a1d3f5e15  sub/maybelarge.dat
   $ hg commit -A -m"add normal3, modify sub/*"
   adding normal3
   created new head
@@ -151,8 +151,8 @@
   $ cat stuff/normal2
   alsonormal
   blah
-  $ sha1sum stuff/maybelarge.dat
-  76236b6a2c6102826c61af4297dd738fb3b1de38  stuff/maybelarge.dat
+  $ "$TESTDIR/md5sum.py" stuff/maybelarge.dat
+  1dd0b99ff80e19cff409702a1d3f5e15  stuff/maybelarge.dat
   $ cat .hglf/stuff/maybelarge.dat
   76236b6a2c6102826c61af4297dd738fb3b1de38
   $ cd ..