diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-09 19:16:15 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-09 19:16:15 +0000 |
commit | 05d3b7cc0de2283f149b07196f1ca0557c062323 (patch) | |
tree | 4bd8a4d447086c3aebc675400d3925806adf2520 /shell/hush_test/hush-vars | |
parent | 1943aec2ec390d9fda159aa0412362780ec83f09 (diff) | |
download | busybox-w32-05d3b7cc0de2283f149b07196f1ca0557c062323.tar.gz busybox-w32-05d3b7cc0de2283f149b07196f1ca0557c062323.tar.bz2 busybox-w32-05d3b7cc0de2283f149b07196f1ca0557c062323.zip |
hush: deal with some easier TODOs
function old new delta
is_well_formed_var_name - 87 +87
builtin_read 49 86 +37
die_if_script - 31 +31
syntax_error_unterminated - 28 +28
syntax_error 26 51 +25
done_word 768 788 +20
syntax_error_at - 12 +12
parse_stream_dquoted 320 328 +8
expand_variables 2064 2063 -1
run_list 1225 1220 -5
add_till_closing_paren 308 303 -5
add_till_backquote 111 106 -5
handle_dollar 812 803 -9
parse_stream 2378 2356 -22
parse_redirect 408 372 -36
maybe_die 44 - -44
is_assignment 215 134 -81
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 4/8 up/down: 248/-208) Total: 40 bytes
Diffstat (limited to 'shell/hush_test/hush-vars')
3 files changed, 14 insertions, 14 deletions
diff --git a/shell/hush_test/hush-vars/param_expand_assign.right b/shell/hush_test/hush-vars/param_expand_assign.right index fff4ead33..d5b258073 100644 --- a/shell/hush_test/hush-vars/param_expand_assign.right +++ b/shell/hush_test/hush-vars/param_expand_assign.right | |||
@@ -2,10 +2,10 @@ hush: syntax error: unterminated ${name} | |||
2 | hush: syntax error: unterminated ${name} | 2 | hush: syntax error: unterminated ${name} |
3 | 0 | 3 | 0 |
4 | 0 | 4 | 0 |
5 | hush: 1: special vars cannot assign in this way | 5 | hush: $1: cannot assign in this way |
6 | hush: 1: special vars cannot assign in this way | 6 | hush: $1: cannot assign in this way |
7 | hush: 1: special vars cannot assign in this way | 7 | hush: $1: cannot assign in this way |
8 | hush: 1: special vars cannot assign in this way | 8 | hush: $1: cannot assign in this way |
9 | _aa | 9 | _aa |
10 | _aa | 10 | _aa |
11 | _aa | 11 | _aa |
diff --git a/shell/hush_test/hush-vars/param_expand_indicate_error.right b/shell/hush_test/hush-vars/param_expand_indicate_error.right index f440f6fae..ec4908c35 100644 --- a/shell/hush_test/hush-vars/param_expand_indicate_error.right +++ b/shell/hush_test/hush-vars/param_expand_indicate_error.right | |||
@@ -5,8 +5,8 @@ hush: syntax error: unterminated ${name} | |||
5 | _ | 5 | _ |
6 | hush: 1: parameter null or not set | 6 | hush: 1: parameter null or not set |
7 | hush: 1: parameter null or not set | 7 | hush: 1: parameter null or not set |
8 | hush: 1: word | 8 | hush: 1: message1 |
9 | hush: 1: word | 9 | hush: 1: message1 |
10 | _aaaa | 10 | _aaaa |
11 | _aaaa | 11 | _aaaa |
12 | _aaaa | 12 | _aaaa |
@@ -15,13 +15,13 @@ _aaaa | |||
15 | _ | 15 | _ |
16 | hush: f: parameter null or not set | 16 | hush: f: parameter null or not set |
17 | hush: f: parameter null or not set | 17 | hush: f: parameter null or not set |
18 | hush: f: word | 18 | hush: f: message3 |
19 | hush: f: word | 19 | hush: f: message3 |
20 | _ | 20 | _ |
21 | _ | 21 | _ |
22 | hush: f: parameter null or not set | 22 | hush: f: parameter null or not set |
23 | _ | 23 | _ |
24 | hush: f: word | 24 | hush: f: message4 |
25 | _fff | 25 | _fff |
26 | _fff | 26 | _fff |
27 | _fff | 27 | _fff |
diff --git a/shell/hush_test/hush-vars/param_expand_indicate_error.tests b/shell/hush_test/hush-vars/param_expand_indicate_error.tests index 77834fedd..1f94181a9 100755 --- a/shell/hush_test/hush-vars/param_expand_indicate_error.tests +++ b/shell/hush_test/hush-vars/param_expand_indicate_error.tests | |||
@@ -12,8 +12,8 @@ | |||
12 | "$THIS_SH" -c 'set --; echo _$1' | 12 | "$THIS_SH" -c 'set --; echo _$1' |
13 | "$THIS_SH" -c 'set --; echo _${1?}' | 13 | "$THIS_SH" -c 'set --; echo _${1?}' |
14 | "$THIS_SH" -c 'set --; echo _${1:?}' | 14 | "$THIS_SH" -c 'set --; echo _${1:?}' |
15 | "$THIS_SH" -c 'set --; echo _${1?word}' | 15 | "$THIS_SH" -c 'set --; echo _${1?message1}' |
16 | "$THIS_SH" -c 'set --; echo _${1:?word}' | 16 | "$THIS_SH" -c 'set --; echo _${1:?message1}' |
17 | 17 | ||
18 | "$THIS_SH" -c 'set -- aaaa; echo _$1' | 18 | "$THIS_SH" -c 'set -- aaaa; echo _$1' |
19 | "$THIS_SH" -c 'set -- aaaa; echo _${1?}' | 19 | "$THIS_SH" -c 'set -- aaaa; echo _${1?}' |
@@ -24,14 +24,14 @@ | |||
24 | "$THIS_SH" -c 'unset f; echo _$f' | 24 | "$THIS_SH" -c 'unset f; echo _$f' |
25 | "$THIS_SH" -c 'unset f; echo _${f?}' | 25 | "$THIS_SH" -c 'unset f; echo _${f?}' |
26 | "$THIS_SH" -c 'unset f; echo _${f:?}' | 26 | "$THIS_SH" -c 'unset f; echo _${f:?}' |
27 | "$THIS_SH" -c 'unset f; echo _${f?word}' | 27 | "$THIS_SH" -c 'unset f; echo _${f?message3}' |
28 | "$THIS_SH" -c 'unset f; echo _${f:?word}' | 28 | "$THIS_SH" -c 'unset f; echo _${f:?message3}' |
29 | 29 | ||
30 | "$THIS_SH" -c 'f=; echo _$f' | 30 | "$THIS_SH" -c 'f=; echo _$f' |
31 | "$THIS_SH" -c 'f=; echo _${f?}' | 31 | "$THIS_SH" -c 'f=; echo _${f?}' |
32 | "$THIS_SH" -c 'f=; echo _${f:?}' | 32 | "$THIS_SH" -c 'f=; echo _${f:?}' |
33 | "$THIS_SH" -c 'f=; echo _${f?word}' | 33 | "$THIS_SH" -c 'f=; echo _${f?word}' |
34 | "$THIS_SH" -c 'f=; echo _${f:?word}' | 34 | "$THIS_SH" -c 'f=; echo _${f:?message4}' |
35 | 35 | ||
36 | "$THIS_SH" -c 'f=fff; echo _$f' | 36 | "$THIS_SH" -c 'f=fff; echo _$f' |
37 | "$THIS_SH" -c 'f=fff; echo _${f?}' | 37 | "$THIS_SH" -c 'f=fff; echo _${f?}' |