hush: fix for nested $()s with escapes + testsuite

This commit is contained in:
Denis Vlasenko
2008-06-12 12:58:20 +00:00
parent bd1aeeb850
commit 76db5adbf7
4 changed files with 25 additions and 2 deletions

View File

@@ -1,4 +1,3 @@
#!/bin/sh
TEST=Q
# \` is special
echo `echo '\'TEST\`echo ZZ\`BEST`

View File

@@ -0,0 +1,7 @@
(TEST) BEST
TEST) BEST
((TEST) BEST
)
abc
a)c
OK: 0

View File

@@ -0,0 +1,7 @@
echo $(echo '(TEST)' BEST)
echo $(echo 'TEST)' BEST)
echo $(echo \(\(TEST\) BEST)
echo $(echo \))
echo $(echo a"`echo "b"`"c )
echo $(echo a"`echo ")"`"c )
echo OK: $?