mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
24356: regex =~ test wasnt handled by gettext()
This commit is contained in:
parent
e3d69e9b36
commit
7d9ead9a46
3 changed files with 20 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-01-04 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 25356: Src/text.c, Test/C02cond.ztst: "=~" wasn't handled by
|
||||
the code that retrieves a printed representation.
|
||||
Non-interactively this caused a crash.
|
||||
|
||||
2008-01-04 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 24349: Functions/Misc/run-help: add comment about HELPDIR to
|
||||
|
|
|
@ -732,7 +732,8 @@ gettext2(Estate state)
|
|||
taddstr(" ");
|
||||
taddstr(ecgetstr(state, EC_NODUP, NULL));
|
||||
if (ctype == COND_STREQ ||
|
||||
ctype == COND_STRNEQ)
|
||||
ctype == COND_STRNEQ ||
|
||||
ctype == COND_REGEX)
|
||||
state->pc++;
|
||||
} else {
|
||||
/* Unary test: `-f foo' etc. */
|
||||
|
|
|
@ -211,6 +211,18 @@ F:Failures in these cases do not indicate a problem in the shell.
|
|||
0:-nt shouldn't abort on non-existent files
|
||||
>status = 1
|
||||
|
||||
# core dumps on failure
|
||||
if zmodload -i zsh/regex 2>/dev/null; then
|
||||
echo >regex_test.sh 'if [[ $# = 1 ]]; then
|
||||
if [[ $1 =~ /?[^/]+:[0-9]+:$ ]]; then
|
||||
:
|
||||
fi
|
||||
fi
|
||||
exit 0'
|
||||
$ZTST_testdir/../Src/zsh -f ./regex_test.sh
|
||||
fi
|
||||
0:regex tests shouldn't crash
|
||||
|
||||
%clean
|
||||
# This works around a bug in rm -f in some versions of Cygwin
|
||||
chmod 644 unmodish
|
||||
|
|
Loading…
Reference in a new issue