On Sun, Sep 27, 2009 at 08:51:48AM +0200, Jim Meyering wrote:
> 
> Thanks for the report.
> Does the following change fix it?
> If so, please tell me what version of bash it's using
> so I can add that to the commit log.

Note that /bin/sh points to dash, not bash.  And the same version
of dash seems to work on other arches.

Running the test with bash instead of dash seems to work.  Adding
the \ also doesn't seem to have any effect.

Removing the '^?' does fix it.

If you believe this to be a bug in dash, please reassign the bug.
This was tested using dash 0.5.5.1-3 and bash 4.0-7.

Output of bash and dash using -x:

$ dash -x test-yesno.sh
+ tmpfiles=
+ trap rm -fr $tmpfiles 1 2 3 15
+ p=t-yesno-
+ tmpfiles=t-yesno-in.tmp t-yesno-xout.tmp t-yesno-out1.tmp
t-yesno-out.tmp t-yesno-err.tmp
+ LC_ALL=C
+ export LC_ALL
+ echo solaris
+ tr -d \r
+ grep solais
+ cr=\r
+ cat
+ n - backspace does not change result
test-yesno.sh: 1: n: not found
+ y
t-yesno.sh: 1: y: not found
+ does not match either yesexpr or noexpr
test-yesno.sh: 1: does: not found
+ n
test-yesno.sh: 1: n: not found
+ EOF
test-yesno.sh: 1: EOF: not found
+ cat
+ ./test-yesno
+ ./test-yesno 3
+ cat
+ LC_ALL=C tr -d \r
+ cmp t-yesno-xout.tmp t-yesno-out.tmp
t-yesno-xout.tmp t-yesno-out.tmp differ: char 3, line 2
+ exit 1

$ bash -x test-yesno.sh
+ tmpfiles=
+ trap 'rm -fr $tmpfiles' 1 2 3 15
+ p=t-yesno-
+ tmpfiles='t-yesno-in.tmp t-yesno-xout.tmp t-yesno-out1.tmp
t-yesno-out.tmp t-yesno-err.tmp'
+ LC_ALL=C
+ export LC_ALL
+ echo solaris
+ tr -d '\r'
+ grep solais
+ cr='\r'
+ cat
+ cat
+ ./test-yesno
+ ./test-yesno 3
+ cat
+ LC_ALL=C
+ tr -d '\r'
+ cmp t-yesno-xout.tmp t-yesno-out.tmp
+ ./test-yesno 3
+ ./test-yesno
+ cat
+ LC_ALL=C
+ tr -d '\r'
+ cmp t-yesno-xout.tmp t-yesno-out.tmp
+ cat
+ echo yes
+ ./test-yesno 2
[...]




-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to