mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-07-24 21:11:02 +02:00
26622: improve comments within $(...) and add test
This commit is contained in:
parent
3d63a33407
commit
a85db68271
3 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-02-27 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 26622: Src/lex.c, Test/A01grammar.ztst: improve 26617 and add
|
||||
test.
|
||||
|
||||
2009-02-26 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 26617, c.f. Tomáš Smetana, 26610: Src/lex.c: comments
|
||||
|
@ -11252,5 +11257,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.4582 $
|
||||
* $Revision: 1.4583 $
|
||||
*****************************************************
|
||||
|
|
|
@ -1813,7 +1813,7 @@ skipcomm(void)
|
|||
c = hgetc();
|
||||
if (itok(c) || lexstop)
|
||||
break;
|
||||
iswhite = isep(c);
|
||||
iswhite = inblank(c);
|
||||
switch (c) {
|
||||
case '(':
|
||||
pct++;
|
||||
|
@ -1861,6 +1861,7 @@ skipcomm(void)
|
|||
add(c);
|
||||
while ((c = hgetc()) != '\n' && !lexstop)
|
||||
add(c);
|
||||
iswhite = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -503,3 +503,15 @@
|
|||
$ZTST_testdir/../Src/zsh -f NonExistentScript
|
||||
127q:Non-existent script causes exit status 127
|
||||
?$ZTST_testdir/../Src/zsh: can't open input file: NonExistentScript
|
||||
|
||||
(setopt nonomatch
|
||||
# use this to get stuff at start of line
|
||||
contents=$'# comment \'\necho value #with " stuff\n# comment\n#comment
|
||||
echo not#comment\n'
|
||||
eval 'VAR=$('"$contents"')'
|
||||
print -l $VAR)
|
||||
0:comments within $(...)
|
||||
>value
|
||||
>not#comment
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue