Re: t0050-filesystem.sh unicode tests borked on dash shell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ramsay Jones wrote:
>     $ ls trash\ directory.t0050-filesystem/unicode/
>     \x61\xcc\x88

The printf at the top evidently does not interpolate \xAA sequences.
Since my 'man 1p printf' POSIX manpage only mandates \AAA octal
sequences, maybe we should use that instead.  Can you verify that the
patch below works for you?

Judging from

  git grep '\\x[0-9a-f][0-9a-f]' t

this is the only instance of this problem, the rest are in Perl code.

--- 8< ---
Subject: t0050: replace \xAA by \AAA in printf

POSIX does not mandate the hex escape sequences, and thus dash's
built-in printf does not expand them.  Use octal escapes instead.

diff --git c/t/t0050-filesystem.sh i/t/t0050-filesystem.sh
index 057c97c..87bf1ff 100755
--- c/t/t0050-filesystem.sh
+++ i/t/t0050-filesystem.sh
@@ -4,8 +4,8 @@ test_description='Various filesystem issues'
 
 . ./test-lib.sh
 
-auml=`printf '\xc3\xa4'`
-aumlcdiar=`printf '\x61\xcc\x88'`
+auml=`printf '\303\244'`
+aumlcdiar=`printf '\141\314\210'`
 
 case_insensitive=
 unibad=

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]