[PATCH 3 of 3 remotefilelog-test-fixes] test-gc: filter wc output as suggested by check-code
raf at durin42.com
raf at durin42.com
Thu Jul 16 11:07:47 CDT 2015
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1437062837 14400
# Thu Jul 16 12:07:17 2015 -0400
# Node ID b80cf401f71a66ce6d18688b40fdbb6917c2fc6e
# Parent 3cf16ed00c9ffabfc1a594fbc37975f598a69fc4
test-gc: filter wc output as suggested by check-code
wc's output is not wholly portable: BSD wc likes to prepend some whitespace.
diff --git a/tests/test-gc.t b/tests/test-gc.t
--- a/tests/test-gc.t
+++ b/tests/test-gc.t
@@ -32,18 +32,18 @@
$ lastweek=`python -c 'import datetime,time; print datetime.datetime.fromtimestamp(time.time() - (86400 * 7)).strftime("%y%m%d%H%M")'`
$ find $CACHEDIR -type f -exec touch -t $lastweek {} \;
- $ find $CACHEDIR -type f | wc -l
+ $ find $CACHEDIR -type f | wc -l | sed -e 's/ //g'
3
$ hg gc
finished: removed 1 of 2 files (0.00 GB to 0.00 GB)
- $ find $CACHEDIR -type f | wc -l
+ $ find $CACHEDIR -type f | wc -l | sed -e 's/ //g'
2
# gc server cache
- $ find master/.hg/remotefilelogcache -type f | wc -l
+ $ find master/.hg/remotefilelogcache -type f | wc -l | sed -e 's/ //g'
2
$ hg gc master
finished: removed 0 of 1 files (0.00 GB to 0.00 GB)
- $ find master/.hg/remotefilelogcache -type f | wc -l
+ $ find master/.hg/remotefilelogcache -type f | wc -l | sed -e 's/ //g'
1
More information about the Mercurial-devel
mailing list