Skip to content

Commit 0189921

Browse files
author
Peter Stephenson
committed
40803, 40804, 40805, 40806: Parameter test additions.
Potentially dodgy string for ${(z)...} splitting from Sebastian. Check that $- and ${-} produce plausible results.
1 parent 64559ab commit 0189921

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
2017-03-09 Peter Stephenson <p.stephenson@samsung.com>
22

3+
* 40805: (combined with the previous change):
4+
Test/D04parameter.ztst: Check that $- and ${-} produce a
5+
plausible result.
6+
7+
* Sebastian: 40803 as modified in 40804 and 40806:
8+
Test/D04parameter.ztst: check for the (z) split flag on some
9+
partly binary data that might be problematic.
10+
311
* 40796: Src/exec.c: We don't want magic '=' expansion if we are
412
already parsing a separate variable name and value.
513

Test/D04parameter.ztst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,11 @@
640640
>echo
641641
>$(|||) bar
642642

643+
foo=$'\x06ZUI\x1f text-field example: \x1azuitfieldtfield1_1\x1a\'\'\x1a\'\'\x1a1\x1aZUI\\[my_tfield1_width\\]\x1aZUI\\[my_tfield1_start\\]\x1aZUI\\[my_tfield1_data\\]\x1c'
644+
print "${#${(z@)foo}}"
645+
0:Test real-world data that once seemed to fail
646+
>4
647+
643648
psvar=(dog)
644649
setopt promptsubst
645650
foo='It shouldn'\''t $(happen) to a %1v.'
@@ -2055,7 +2060,7 @@
20552060
a='~-/'; echo $~a
20562061
0:Regression: "-" became Dash in workers/37689, breaking ~- expansion
20572062
*>*
2058-
F:We do not care what $OLDPWD is, as long as it doesn't cause an error
2063+
F:We do not care what $OLDPWD is, as long as it does not cause an error
20592064

20602065
(
20612066
set -- one 'two three' four
@@ -2136,3 +2141,10 @@ F:We do not care what $OLDPWD is, as long as it doesn't cause an error
21362141
>[one two three four]
21372142
F:As of this writing, var=$@ and var="$@" with null IFS have unspecified
21382143
F:behavior, see http://austingroupbugs.net/view.php?id=888
2144+
2145+
() {
2146+
setopt localoptions extendedglob
2147+
[[ $- = [[:alnum:]]## ]] || print Failed 1
2148+
[[ ${-} = [[:alnum:]]## ]] || print Failed 2
2149+
}
2150+
0:$- expansion correctly handles Dash token

0 commit comments

Comments
 (0)