mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 18:52:35 +02:00
commit bash-20061130 snapshot
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
./comsub.tests: line 7: hijkl: command not found
|
||||
argv[1] = <ab>
|
||||
argv[2] = <cd>
|
||||
argv[1] = <abmn>
|
||||
argv[2] = <opyz>
|
||||
argv[1] = <b>
|
||||
argv[1] = <a\>
|
||||
argv[2] = <b>
|
||||
argv[1] = <$>
|
||||
argv[2] = <bab>
|
||||
argv[1] = <`>
|
||||
argv[2] = <ab>
|
||||
argv[1] = <\>
|
||||
argv[2] = <ab>
|
||||
argv[1] = <foo \\^Jbar>
|
||||
argv[1] = <foo \^Jbar>
|
||||
argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]/\^J/g>
|
||||
argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]//g>
|
||||
argv[1] = <foo\^Jbar>
|
||||
argv[1] = <foobar>
|
||||
argv[1] = <foo\^Jbar>
|
||||
@@ -0,0 +1,42 @@
|
||||
# command substution parsing tests
|
||||
|
||||
TABSIZE=`grep -v '^[ #]' $CAPS </dev/null | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
|
||||
|
||||
recho `echo ab cd #efg
|
||||
hijkl`
|
||||
|
||||
recho ab$(echo mn; echo op)yz
|
||||
|
||||
a=`echo 'a b c' | sed 's/ /\\
|
||||
/g' | grep 'b'`
|
||||
recho $a
|
||||
|
||||
recho `echo 'a\' b`
|
||||
|
||||
recho `echo '\$' bab`
|
||||
|
||||
recho `echo '\`' ab`
|
||||
|
||||
recho `echo '\\' ab`
|
||||
|
||||
# old-style command substitution parsing compatibility tests -- post bash-3.1
|
||||
recho 'foo \\
|
||||
bar'
|
||||
|
||||
recho 'foo \
|
||||
bar'
|
||||
|
||||
echo `recho sed -e 's/[ :]/\\
|
||||
/g'`
|
||||
|
||||
echo `recho sed -e 's/[ :]/\
|
||||
/g'`
|
||||
|
||||
echo `recho 'foo\\
|
||||
bar'`
|
||||
|
||||
echo `recho 'foo\
|
||||
bar'`
|
||||
|
||||
echo $(recho 'foo\
|
||||
bar')
|
||||
@@ -19,7 +19,7 @@ debug lineno: 24 fn1
|
||||
debug lineno: 24 fn1
|
||||
debug lineno: 25 fn1
|
||||
./dbg-support.tests: line 25: caller: foo: invalid number
|
||||
caller: usage: caller [EXPR]
|
||||
caller: usage: caller [expr]
|
||||
debug lineno: 25 fn1
|
||||
debug lineno: 17 fn1
|
||||
debug lineno: 12 print_return_trap
|
||||
@@ -48,7 +48,7 @@ debug lineno: 24 fn1
|
||||
debug lineno: 24 fn1 71 main ./dbg-support.tests
|
||||
debug lineno: 25 fn1
|
||||
./dbg-support.tests: line 25: caller: foo: invalid number
|
||||
caller: usage: caller [EXPR]
|
||||
caller: usage: caller [expr]
|
||||
debug lineno: 25 fn1
|
||||
debug lineno: 17 fn1
|
||||
debug lineno: 12 print_return_trap
|
||||
@@ -190,7 +190,7 @@ FUNCNAME[0] fn1
|
||||
79 main ./dbg-support.tests
|
||||
|
||||
./dbg-support.tests: line 25: caller: foo: invalid number
|
||||
caller: usage: caller [EXPR]
|
||||
caller: usage: caller [expr]
|
||||
|
||||
debug lineno: 80 main
|
||||
fn2 here. Calling fn1...
|
||||
@@ -202,7 +202,7 @@ FUNCNAME[0] fn1
|
||||
30 fn2 ./dbg-support.tests
|
||||
80 main ./dbg-support.tests
|
||||
./dbg-support.tests: line 25: caller: foo: invalid number
|
||||
caller: usage: caller [EXPR]
|
||||
caller: usage: caller [expr]
|
||||
|
||||
debug lineno: 81 main
|
||||
LINENO 34
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
./dstack.tests: line 9: pushd: no other directory
|
||||
./dstack.tests: line 10: popd: directory stack empty
|
||||
./dstack.tests: line 13: pushd: -m: invalid number
|
||||
pushd: usage: pushd [dir | +N | -N] [-n]
|
||||
pushd: usage: pushd [-n] [+N | -N | dir]
|
||||
./dstack.tests: line 14: popd: -m: invalid number
|
||||
popd: usage: popd [+N | -N] [-n]
|
||||
popd: usage: popd [-n] [+N | -N]
|
||||
./dstack.tests: line 15: dirs: -m: invalid number
|
||||
dirs: usage: dirs [-clpv] [+N] [-N]
|
||||
./dstack.tests: line 16: dirs: 7: invalid option
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ source: usage: source filename [arguments]
|
||||
./errors.tests: line 184: .: -i: invalid option
|
||||
.: usage: . filename [arguments]
|
||||
./errors.tests: line 187: set: -q: invalid option
|
||||
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
|
||||
set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
|
||||
./errors.tests: line 190: enable: sh: not a shell builtin
|
||||
./errors.tests: line 190: enable: bash: not a shell builtin
|
||||
./errors.tests: line 193: shopt: cannot set and unset shell options simultaneously
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
history: usage: history [-c] [-d offset] [n] or history -awrn [filename] or history -ps arg [arg...]
|
||||
./history.tests: line 6: history: cannot use more than one of -anrw
|
||||
./history.tests: line 9: fc: -v: invalid option
|
||||
fc: usage: fc [-e ename] [-nlr] [first] [last] or fc -s [pat=rep] [cmd]
|
||||
fc: usage: fc [-e ename] [-nlr] [first] [last] or fc -s [pat=rep] [command]
|
||||
1 for i in one two three; do echo $i; done
|
||||
2 /bin/sh -c 'echo this is $0'
|
||||
3 ls
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
a=$'\303\251'
|
||||
|
||||
|
||||
@@ -515,4 +515,7 @@ argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = <12>
|
||||
argv[1] = <>
|
||||
argv[1] = <>
|
||||
argv[1] = </tmp/test/TEST>
|
||||
./new-exp.tests: line 560: ABXD: parameter unset
|
||||
|
||||
@@ -20,3 +20,10 @@ recho "${str/$str/}"
|
||||
recho "${snul##$snul}"
|
||||
recho "${str##$str}"
|
||||
recho "${str##$nul}"
|
||||
|
||||
A=""
|
||||
B="${A:0}"
|
||||
|
||||
recho "$B"
|
||||
recho "${A:0}"
|
||||
recho "/tmp/test/TEST${A:0}"
|
||||
|
||||
Binary file not shown.
@@ -285,3 +285,18 @@ printf "%E\n" 4
|
||||
printf "%e\n" 4
|
||||
printf "%4.2E\n" 4
|
||||
printf "%4.2e\n" 4
|
||||
|
||||
printf "%08X\n" 2604292517
|
||||
|
||||
# make sure these format specifiers all output '' for empty string arguments
|
||||
echo q
|
||||
printf "%q\n" ""
|
||||
printf "%q\n"
|
||||
|
||||
echo s
|
||||
printf "%s\n" ''
|
||||
printf "%s\n"
|
||||
|
||||
echo b
|
||||
printf "%b\n" ''
|
||||
printf "%b\n"
|
||||
|
||||
@@ -253,3 +253,48 @@ printf '%0.5d\n' 1
|
||||
printf '%05d\n' 1
|
||||
printf '%5d\n' 1
|
||||
printf '%0d\n' 1
|
||||
|
||||
# failures with various floating point formats and 0 after bash-3.2
|
||||
|
||||
printf "%G\n" 0
|
||||
printf "%g\n" 0
|
||||
printf "%4.2G\n" 0
|
||||
printf "%4.2g\n" 0
|
||||
|
||||
printf "%G\n" 4
|
||||
printf "%g\n" 4
|
||||
printf "%4.2G\n" 4
|
||||
printf "%4.2g\n" 4
|
||||
|
||||
printf "%F\n" 0
|
||||
printf "%f\n" 0
|
||||
printf "%4.2F\n" 0
|
||||
printf "%4.2f\n" 0
|
||||
|
||||
printf "%F\n" 4
|
||||
printf "%f\n" 4
|
||||
printf "%4.2F\n" 4
|
||||
printf "%4.2f\n" 4
|
||||
|
||||
printf "%E\n" 0
|
||||
printf "%e\n" 0
|
||||
printf "%4.2E\n" 0
|
||||
printf "%4.2e\n" 0
|
||||
|
||||
printf "%E\n" 4
|
||||
printf "%e\n" 4
|
||||
printf "%4.2E\n" 4
|
||||
printf "%4.2e\n" 4
|
||||
|
||||
# make sure these format specifiers all output '' for empty string arguments
|
||||
echo q
|
||||
printf "%q\n" ""
|
||||
printf "%q\n"
|
||||
|
||||
echo s
|
||||
printf "%s\n" ''
|
||||
printf "%s\n"
|
||||
|
||||
echo b
|
||||
printf "%b\n" ''
|
||||
printf "%b\n"
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
./rsh.tests: line 21: /tmp/restricted: restricted: cannot redirect output
|
||||
./rsh.tests: line 26: command: -p: restricted
|
||||
./rsh.tests: line 28: set: +r: invalid option
|
||||
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
|
||||
set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
|
||||
./rsh.tests: line 29: set: restricted: invalid option name
|
||||
./rsh.tests: line 31: exec: restricted
|
||||
./rsh.tests: after exec
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
${THIS_SH} ./comsub.tests > /tmp/xx 2>&1
|
||||
diff /tmp/xx comsub.right && rm -f /tmp/xx
|
||||
Reference in New Issue
Block a user