mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-03 18:30:49 +02:00
commit bash-20110304 snapshot
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
@@ -235,4 +235,7 @@ ${THIS_SH} ./dollar-star4.sub
|
||||
# tests for expansions of $* when IFS is null
|
||||
${THIS_SH} ./dollar-star5.sub
|
||||
|
||||
# tests for inappropriate word splitting through bash-4.2
|
||||
${THIS_SH} ./dollar-at4.sub
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
set 'a b' 'c d'
|
||||
|
||||
recho "$@"
|
||||
recho $@
|
||||
|
||||
quoted="$@"
|
||||
unquoted=$@
|
||||
|
||||
recho "$quoted"
|
||||
recho "$unquoted"
|
||||
@@ -166,3 +166,11 @@ ab
|
||||
cd
|
||||
ok 1
|
||||
ok 2
|
||||
argv[1] = <a b>
|
||||
argv[2] = <c d>
|
||||
argv[1] = <a>
|
||||
argv[2] = <b>
|
||||
argv[3] = <c>
|
||||
argv[4] = <d>
|
||||
argv[1] = <a b c d>
|
||||
argv[1] = <a b c d>
|
||||
|
||||
+2
-1
@@ -58,7 +58,8 @@ qux
|
||||
|
||||
bar
|
||||
qux
|
||||
abc def geh
|
||||
comsub here-string
|
||||
./heredoc.tests: line 100: warning: here-document at line 98 delimited by end-of-file (wanted `EOF')
|
||||
./heredoc.tests: line 103: warning: here-document at line 101 delimited by end-of-file (wanted `EOF')
|
||||
hi
|
||||
there
|
||||
|
||||
@@ -88,6 +88,9 @@ ${THIS_SH} -c 'type fff'
|
||||
|
||||
${THIS_SH} ./heredoc1.sub
|
||||
|
||||
# test heredocs in command substitutions
|
||||
${THIS_SH} ./heredoc2.sub
|
||||
|
||||
echo $(
|
||||
cat <<< "comsub here-string"
|
||||
)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
TEST=$(cat <<EOF | sort -u
|
||||
abc
|
||||
geh
|
||||
def
|
||||
abc
|
||||
EOF
|
||||
)
|
||||
|
||||
echo $TEST
|
||||
@@ -51,3 +51,7 @@ printf "%-40.50(%a %b %e %H:%M:%S %Z %Y)T date-style time\n" $SECS
|
||||
|
||||
# test fieldwidth, justification, precision, embedded parens
|
||||
printf "%-40.50(%x (foo) %X)T date-style time\n" $SECS
|
||||
|
||||
# problem introduced in bash-4.2 patch 5
|
||||
unset TZ
|
||||
printf '%(%Y-%m-%d %H:%M:%S %Z)T\n' >/dev/null
|
||||
|
||||
@@ -90,3 +90,12 @@ argv[1] = <>
|
||||
good 1
|
||||
good 2
|
||||
good 3
|
||||
good 4
|
||||
good 5
|
||||
ok 1
|
||||
ok 2
|
||||
ok 3
|
||||
ok 4
|
||||
ok 5
|
||||
ok 6
|
||||
ok 7
|
||||
|
||||
@@ -37,3 +37,54 @@ if [ "$var"X == ""X"" ]; then
|
||||
echo good 3
|
||||
fi
|
||||
|
||||
if [ X"" == X ]; then
|
||||
echo good 4
|
||||
fi
|
||||
|
||||
if [[ X"" == X ]]; then
|
||||
echo good 5
|
||||
fi
|
||||
|
||||
case x"" in
|
||||
x) echo 'ok 1'
|
||||
;;
|
||||
x??) echo 'this would be really odd'
|
||||
;;
|
||||
x?) echo 'does this prove anything?'
|
||||
echo x""x
|
||||
;;
|
||||
*) echo 'no match'
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ x"" == x ]]; then
|
||||
echo ok 2
|
||||
fi
|
||||
|
||||
if [[ x"" == x"" ]]; then
|
||||
echo ok 3
|
||||
else
|
||||
echo bad 3
|
||||
fi
|
||||
|
||||
case x"" in
|
||||
x"") echo ok 4 ;;
|
||||
*) echo bad 4;;
|
||||
esac
|
||||
|
||||
if [[ x"" == x"" ]]; then
|
||||
echo ok 5
|
||||
else
|
||||
echo bad 5
|
||||
fi
|
||||
|
||||
case x"" in
|
||||
"x") echo ok 6 ;;
|
||||
*) echo bad 6;;
|
||||
esac
|
||||
|
||||
case x"" in
|
||||
"x") echo CTLNUL 7 ;;
|
||||
x) echo ok 7 ;;
|
||||
*) echo bad 7 ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user