mirror of
https://github.com/sheumann/hush.git
synced 2024-12-25 03:32:18 +00:00
ebee410fe2
function old new delta expand_one_var 1513 1552 +39 expand_pseudo_dquoted 118 135 +17 expand_string_to_string 110 126 +16 setup_heredoc 298 308 +10 expand_and_evaluate_arith 69 79 +10 parse_stream_dquoted 233 241 +8 setup_redirects 220 225 +5 run_list 956 961 +5 expand_assignments 76 81 +5 run_pipe 1587 1590 +3 parse_stream 2371 2374 +3 builtin_umask 132 133 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 12/0 up/down: 122/0) Total: 122 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
30 lines
459 B
Plaintext
Executable File
30 lines
459 B
Plaintext
Executable File
# This testcase checks whether slashes in ${v/a/b} are parsed before
|
|
# or after expansions
|
|
|
|
v='a/b/c'
|
|
s='b/c'
|
|
r='e/f'
|
|
echo "1 ${v/$s}"
|
|
echo "2 ${v/$s/d}"
|
|
echo "3 ${v/$s/$r}"
|
|
|
|
v='a\b\c'
|
|
s='b\\c'
|
|
r='e\f'
|
|
echo "4 ${v/$s}"
|
|
echo "5 ${v/$s/d}"
|
|
echo "6 ${v/$s/$r}"
|
|
|
|
v='a\\b\\c'
|
|
s='b\\\\c'
|
|
r='e\\f'
|
|
echo "7 ${v/$s}"
|
|
echo "8 ${v/$s/d}"
|
|
echo "9 ${v/$s/$r}"
|
|
|
|
v='a-$a-\t-\\-\"-\`-\--\z-\*-\?-b'
|
|
s='-$a-\\t-\\\\-\\"-\\`-\\--\\z-\\\*-\\\?-'
|
|
echo "a ${v/$s}"
|
|
|
|
echo Done: $?
|