[PATCH 1 of 2] Make test-verify SUSv3 compatible

Will Maier willmaier at ml1.net
Fri Jun 5 00:43:30 UTC 2009


# HG changeset patch
# User Will Maier <willmaier at ml1.net>
# Date 1244158410 21600
# Node ID aa1c5d2271021f3ed211aad6db3223b27fa4102f
# Parent  de6bb29e208a6e1d3e68bc7840e5798377082c30
Make test-verify SUSv3 compatible.

'head -c' isn't supported on (at least) OpenBSD and is not
part of SUSv3. Instead, use dd.

See also:

    http://www.opengroup.org/onlinepubs/009695399/utilities/head.html

diff --git a/tests/test-verify b/tests/test-verify
--- a/tests/test-verify
+++ b/tests/test-verify
@@ -35,7 +35,7 @@
 hg ci -m a
 
 echo 'corrupted' > b
-head -c 20 .hg/store/data/a.i > start
+dd if=.hg/store/data/a.i of=start bs=1 count=20 2>/dev/null
 cat start b > .hg/store/data/a.i
 
 echo


-- 

[Will Maier]-----------------[willmaier at ml1.net|http://www.lfod.us/]



More information about the Mercurial-devel mailing list