[PATCH STABLE] tests: ensure printf octal escapes have at least 2 digits
Matt Mackall
mpm at selenic.com
Mon Feb 6 20:18:47 UTC 2012
On Fri, 2012-02-03 at 23:28 +0000, Jim Hague wrote:
> # HG changeset patch
> # User Jim Hague <jim.hague at acm.org>
> # Date 1328311641 0
> # Branch stable
> # Node ID bf64d6632411a286b0da43f2ef01f05c207d557c
> # Parent 6adf9f20da9889b65dd75265ab3ee223d666ae2c
> tests: ensure printf octal escapes have at least 2 digits
>
> printf on AIX default shell ksh (89) says \1 is an invalid escape. It insists
> on at least 2 digits. printf \0 does work.
Changes like this should come with an appropriate check-code fix to
avoid recurrence. No one in the modern world is going to know or care
about ksh limitations otherwise.
> diff -r 6adf9f20da98 -r bf64d6632411 tests/test-keyword.t
> --- a/tests/test-keyword.t Fri Feb 03 23:27:17 2012 +0000
> +++ b/tests/test-keyword.t Fri Feb 03 23:27:21 2012 +0000
> @@ -167,12 +167,12 @@
> $ cp $HGRCPATH.nohooks $HGRCPATH
> $ rm hooktest
>
> -hg status of kw-ignored binary file starting with '\1\n'
> +hg status of kw-ignored binary file starting with '\01\n'
>
> - $ printf '\1\nfoo' > i
> + $ printf '\01\nfoo' > i
> $ hg -q commit -Am metasep i
> $ hg status
> - $ printf '\1\nbar' > i
> + $ printf '\01\nbar' > i
> $ hg status
> M i
> $ hg -q commit -m "modify metasep" i
> diff -r 6adf9f20da98 -r bf64d6632411 tests/test-status.t
> --- a/tests/test-status.t Fri Feb 03 23:27:17 2012 +0000
> +++ b/tests/test-status.t Fri Feb 03 23:27:21 2012 +0000
> @@ -275,16 +275,16 @@
>
> $ cd ..
>
> -hg status of binary file starting with '\1\n', a separator for metadata:
> +hg status of binary file starting with '\01\n', a separator for metadata:
>
> $ hg init repo5
> $ cd repo5
> - $ printf '\1\nfoo' > 010a
> + $ printf '\01\nfoo' > 010a
> $ hg ci -q -A -m 'initial checkin'
> $ hg status -A
> C 010a
>
> - $ printf '\1\nbar' > 010a
> + $ printf '\01\nbar' > 010a
> $ hg status -A
> M 010a
> $ hg ci -q -m 'modify 010a'
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list