echo \ 3
+echo 'b\ 3#\ 3c'
echo Done:$?
b'c
b$c
b`true`c
+b\ 3#\ 3c
Zero:0
-# UNFIXED BUG.
-# commented-out words contain ^C character.
-# It's a SPECIAL_VAR_SYMBOL, for now hush does not escape it.
-# When it is fixed, update this test.
-
-for a in 'a' 'b\c' 'b\\c' 'b"c' "b'c" 'b$c' 'b`true`c' ### 'b\ 3#\ 3c'
+# last word contains ^C character.
+for a in 'a' 'b\c' 'b\\c' 'b"c' "b'c" 'b$c' 'b`true`c' 'b\ 3#\ 3c'
do
echo $a
done
nommu_addchr(&ctx.as_string, ch);
if (ch == '\'')
break;
+ if (ch == SPECIAL_VAR_SYMBOL) {
+ /* Convert raw ^C to corresponding special variable reference */
+ o_addchr(&dest, SPECIAL_VAR_SYMBOL);
+ o_addchr(&dest, SPECIAL_VAR_QUOTED_SVS);
+ }
o_addqchr(&dest, ch);
}
}
echo \ 3
+echo 'b\ 3#\ 3c'
echo Done:$?
b'c
b$c
b`true`c
+b\ 3#\ 3c
Zero:0
-# UNFIXED BUG.
-# commented-out words contain ^C character.
-# It's a SPECIAL_VAR_SYMBOL, for now hush does not escape it.
-# When it is fixed, update this test.
-
-for a in 'a' 'b\c' 'b\\c' 'b"c' "b'c" 'b$c' 'b`true`c' ### 'b\ 3#\ 3c'
+# last word contains ^C character.
+for a in 'a' 'b\c' 'b\\c' 'b"c' "b'c" 'b$c' 'b`true`c' 'b\ 3#\ 3c'
do
echo $a
done