mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
40179: fix handling of "printf -" and "printf --"
unposted: regression test for 40179 / 37467
This commit is contained in:
parent
5f2661376d
commit
dc1f3aae60
3 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2016-12-14 Barton E. Schaefer <schaefer@brasslantern.com>
|
||||||
|
|
||||||
|
* 40179: Src/builtin.c: fix handling of "printf -" and "printf --"
|
||||||
|
|
||||||
|
* unposted: Test/B03print.ztst: regression for 40179 / 37467
|
||||||
|
|
||||||
2016-12-12 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
2016-12-12 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
* unposted: Config/version.mk: update to 5.3-dev-0 to avoid
|
* unposted: Config/version.mk: update to 5.3-dev-0 to avoid
|
||||||
|
|
|
@ -100,7 +100,7 @@ static struct builtin builtins[] =
|
||||||
|
|
||||||
BUILTIN("popd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 1, BIN_POPD, "q", NULL),
|
BUILTIN("popd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 1, BIN_POPD, "q", NULL),
|
||||||
BUILTIN("print", BINF_PRINTOPTS, bin_print, 0, -1, BIN_PRINT, "abcC:Df:ilmnNoOpPrRsSu:v:x:X:z-", NULL),
|
BUILTIN("print", BINF_PRINTOPTS, bin_print, 0, -1, BIN_PRINT, "abcC:Df:ilmnNoOpPrRsSu:v:x:X:z-", NULL),
|
||||||
BUILTIN("printf", 0, bin_print, 1, -1, BIN_PRINTF, "v:", NULL),
|
BUILTIN("printf", BINF_SKIPINVALID | BINF_SKIPDASH, bin_print, 1, -1, BIN_PRINTF, "v:", NULL),
|
||||||
BUILTIN("pushd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 2, BIN_PUSHD, "qsPL", NULL),
|
BUILTIN("pushd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 2, BIN_PUSHD, "qsPL", NULL),
|
||||||
BUILTIN("pushln", 0, bin_print, 0, -1, BIN_PRINT, NULL, "-nz"),
|
BUILTIN("pushln", 0, bin_print, 0, -1, BIN_PRINT, NULL, "-nz"),
|
||||||
BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLP", NULL),
|
BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLP", NULL),
|
||||||
|
|
|
@ -322,3 +322,17 @@
|
||||||
typeset -p foo
|
typeset -p foo
|
||||||
0:printf to an array variable without format string reuse
|
0:printf to an array variable without format string reuse
|
||||||
>typeset foo=string
|
>typeset foo=string
|
||||||
|
|
||||||
|
printf -
|
||||||
|
printf - -
|
||||||
|
printf --
|
||||||
|
printf -- -
|
||||||
|
printf -- --
|
||||||
|
printf -x -v foo
|
||||||
|
# Final print for newline on stdout
|
||||||
|
print
|
||||||
|
0:regression test of printf with assorted ambiguous options or formats
|
||||||
|
>------x
|
||||||
|
?(eval):printf:3: not enough arguments
|
||||||
|
F:There is some question whether "printf --" should be an error as above,
|
||||||
|
F:or should treat "--" as the format string. Bash agrees on the error.
|
||||||
|
|
Loading…
Reference in a new issue