|
1 # solaris is compiled with --enable-xpg-echo-default=yes which makes some |
|
2 # tests fail. Should we use printf '%s\n' "..." instead? |
|
3 # |
|
4 # Reported on [email protected] |
|
5 |
|
6 --- tests/posixexp2.tests 2010-11-11 17:50:47.000000000 -0800 |
|
7 +++ tests/posixexp2.tests 2012-07-12 13:15:14.818468328 -0700 |
|
8 @@ -2,6 +2,11 @@ |
|
9 |
|
10 set -o posix |
|
11 |
|
12 +xpg=`shopt | grep xpg_echo | awk '{ print $2 }'` |
|
13 +if [ ${xpg} = "on" ] ; then |
|
14 + shopt -u xpg_echo |
|
15 +fi |
|
16 + |
|
17 (echo 1 ${IFS+'}'z}) 2>&- || echo failed in 1 |
|
18 (echo 2 "${IFS+'}'z}") 2>&- || echo failed in 2 |
|
19 (echo 3 "foo ${IFS+'bar} baz") 2>&- || echo failed in 3 |
|
20 --- tests/comsub2.sub 2016-11-28 01:04:23.177652643 -0800 |
|
21 +++ tests/comsub2.sub 2016-11-28 01:01:49.330747645 -0800 |
|
22 @@ -4,5 +4,5 @@ echo "$qpath" |
|
23 |
|
24 # it's crazy that all three of these produce the same result |
|
25 echo ${qpath//\\/} |
|
26 -echo ${qpath//"`echo \\`"/} |
|
27 -echo ${qpath//`echo "\\\\\\\\"`/} |
|
28 +echo ${qpath//"`echo -E \\`"/} |
|
29 +echo ${qpath//`echo -E "\\\\\\\\"`/} |
|
30 --- tests/exp5.sub 2016-11-28 02:38:32.148794257 -0800 |
|
31 +++ tests/exp5.sub 2016-11-28 02:33:12.133199473 -0800 |
|
32 @@ -1,18 +1,18 @@ |
|
33 # expansions involving patterns |
|
34 |
|
35 var='[hello' |
|
36 -echo "${var//[/}" |
|
37 +echo -E "${var//[/}" |
|
38 |
|
39 red='\[\e[0;31m\]' |
|
40 -echo "${red//\\[\\e/}" |
|
41 +echo -E "${red//\\[\\e/}" |
|
42 |
|
43 foo="${red//\\[\\e/}" |
|
44 |
|
45 # foo == [0;31m\] |
|
46 -echo "${foo//[0;31m\\/}" |
|
47 +echo -E "${foo//[0;31m\\/}" |
|
48 |
|
49 -echo "${var//[]/}" |
|
50 -echo "${red//[]/}" |
|
51 +echo -E "${var//[]/}" |
|
52 +echo -E "${red//[]/}" |
|
53 |
|
54 v=hello |
|
55 foo='[:alpha:]' |
|
56 --- tests/exp8.sub 2016-11-28 03:44:56.875686938 -0800 |
|
57 +++ tests/exp8.sub 2016-11-28 03:39:21.761054928 -0800 |
|
58 @@ -10,11 +10,11 @@ declare -p var | sed -n l |
|
59 |
|
60 recho ${var@Q} |
|
61 recho ${var@P} |
|
62 -echo ${var@A} |
|
63 +echo -E ${var@A} |
|
64 |
|
65 unset array |
|
66 array=( [$'x\001y\177z']=foo ) # should be error |
|
67 -echo ${array[@]@A} |
|
68 +echo -E ${array[@]@A} |
|
69 |
|
70 unset array |
|
71 declare -a array=([0]=$'x\001y\177z') |
|
72 @@ -23,9 +23,9 @@ declare -p array |
|
73 unset array |
|
74 array=( "$var" ) |
|
75 recho ${array[@]} |
|
76 -echo ${array[@]@A} |
|
77 +echo -E ${array[@]@A} |
|
78 |
|
79 unset array |
|
80 declare -A array |
|
81 array=( [$'x\001y\177z']=$'a\242b\002c' ) |
|
82 -echo ${array[@]@A} |
|
83 +echo -E ${array[@]@A} |
|
84 --- tests/heredoc3.sub 2016-11-28 03:58:47.587299575 -0800 |
|
85 +++ tests/heredoc3.sub 2016-11-28 03:55:11.935894965 -0800 |
|
86 @@ -69,7 +69,7 @@ cat <<END |
|
87 hello |
|
88 \END |
|
89 END |
|
90 -echo end 'hello<NL>\END' |
|
91 +echo -E end 'hello<NL>\END' |
|
92 |
|
93 # this has to be last -- results in a syntax error |
|
94 # doesn't currently parse because EOF is not on a line by itself -- should it? |
|
95 --- tests/quote1.sub 2016-11-28 04:11:46.210688369 -0800 |
|
96 +++ tests/quote1.sub 2016-11-28 04:08:49.101872596 -0800 |
|
97 @@ -14,7 +14,7 @@ echo "'${test//"'"/}'" |
|
98 |
|
99 echo "'${test//"'"/"'\\''"}'" |
|
100 |
|
101 -echo "'${test//"'"/\'\\'\'}'" |
|
102 +echo -E "'${test//"'"/\'\\'\'}'" |
|
103 |
|
104 #echo "'${test//'/}'" # hangs waiting for ' |
|
105 #echo "'${test//"'"/'\\''}'" # hangs waiting for ' |