[PATCH 3 of 4] solaris: tests can't use tail -n
Augie Fackler
raf at durin42.com
Mon Aug 26 15:00:47 CDT 2013
On Mon, Aug 26, 2013 at 10:28:36AM -0700, Danek Duvall wrote:
> # HG changeset patch
> # User Danek Duvall <danek.duvall at oracle.com>
> # Date 1377297397 25200
> # Node ID 7d2fe0113e5c21bc204616649256d1bb59d7d7f5
> # Parent bd488d5b5763ef8c4bc7b4a69e4073861e2487a1
> solaris: tests can't use tail -n
Afraid we'll have to come up with another solution for this:
+ tail: cannot open `+8' for reading: No such file or directory
>
> Solaris tail doesn't recognize the -n option. Remove the one use of it and
> add a test case to check-code.py.
>
> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -68,6 +68,7 @@ testpats = [
> (r'echo -n', "don't use 'echo -n', use printf"),
> (r'(^| )wc[^|]*$\n(?!.*\(re\))', "filter wc output"),
> (r'head -c', "don't use 'head -c', use 'dd'"),
> + (r'tail -n', "don't use the '-n' option to tail, just use '-<num>'"),
> (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"),
> (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"),
> (r'printf.*[^\\]\\([1-9]|0\d)', "don't use 'printf \NNN', use Python"),
> diff --git a/tests/test-import-merge.t b/tests/test-import-merge.t
> --- a/tests/test-import-merge.t
> +++ b/tests/test-import-merge.t
> @@ -129,7 +129,7 @@ Test that --exact on a bad header doesn'
> $ echo a>>a
> $ hg ci -m3
> $ hg export 2 | head -7 > ../a.patch
> - $ hg export tip | tail -n +8 >> ../a.patch
> + $ hg export tip | tail +8 >> ../a.patch
>
> $ cd ..
> $ hg clone -qr0 repo3 repo3-clone
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list