Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

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

From: Thomas Rast <hidden>
Date: 2016-06-15 22:50:17

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help