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 | |
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')
4 files changed, 41 insertions, 41 deletions
diff --git a/shell/hush_test/hush-arith/arith.right b/shell/hush_test/hush-arith/arith.right index a35fe893f..8cde0ee53 100644 --- a/shell/hush_test/hush-arith/arith.right +++ b/shell/hush_test/hush-arith/arith.right | |||
@@ -55,28 +55,28 @@ Format: 'expected actual' | |||
55 | 30 30 | 55 | 30 30 |
56 | 20 20 | 56 | 20 20 |
57 | 30 30 | 57 | 30 30 |
58 | hush: arith: syntax error | 58 | hush: error in arithmetic |
59 | 6 6 | 59 | 6 6 |
60 | 6,5,3 6,5,3 | 60 | 6,5,3 6,5,3 |
61 | 263 263 | 61 | 263 263 |
62 | 255 255 | 62 | 255 255 |
63 | 40 40 | 63 | 40 40 |
64 | hush: arith: syntax error | 64 | hush: error in arithmetic |
65 | hush: arith: divide by zero | 65 | hush: divide by 0 |
66 | hush: can't exec 'let': No such file or directory | 66 | hush: can't exec 'let': No such file or directory |
67 | hush: arith: syntax error | 67 | hush: error in arithmetic |
68 | hush: can't exec 'let': No such file or directory | 68 | hush: can't exec 'let': No such file or directory |
69 | abc | 69 | abc |
70 | def | 70 | def |
71 | ghi | 71 | ghi |
72 | hush: arith: syntax error | 72 | hush: error in arithmetic |
73 | 16 16 | 73 | 16 16 |
74 | hush: arith: syntax error | 74 | hush: error in arithmetic |
75 | hush: arith: syntax error | 75 | hush: error in arithmetic |
76 | hush: arith: syntax error | 76 | hush: error in arithmetic |
77 | 9 9 | 77 | 9 9 |
78 | hush: arith: syntax error | 78 | hush: error in arithmetic |
79 | hush: arith: syntax error | 79 | hush: error in arithmetic |
80 | 9 9 | 80 | 9 9 |
81 | 9 9 | 81 | 9 9 |
82 | 9 9 | 82 | 9 9 |
@@ -97,18 +97,18 @@ hush: arith: syntax error | |||
97 | 3 3 | 97 | 3 3 |
98 | 4 4 | 98 | 4 4 |
99 | 4 4 | 99 | 4 4 |
100 | hush: arith: syntax error | 100 | hush: error in arithmetic |
101 | hush: arith: syntax error | 101 | hush: error in arithmetic |
102 | hush: arith: syntax error | 102 | hush: error in arithmetic |
103 | hush: arith: syntax error | 103 | hush: error in arithmetic |
104 | hush: arith: syntax error | 104 | hush: error in arithmetic |
105 | 4 4 | 105 | 4 4 |
106 | 7 7 | 106 | 7 7 |
107 | -7 -7 | 107 | -7 -7 |
108 | hush: arith: syntax error | 108 | hush: error in arithmetic |
109 | hush: arith: syntax error | 109 | hush: error in arithmetic |
110 | hush: arith: syntax error | 110 | hush: error in arithmetic |
111 | hush: arith: syntax error | 111 | hush: error in arithmetic |
112 | 6 6 | 112 | 6 6 |
113 | 3 3 | 113 | 3 3 |
114 | 7 7 | 114 | 7 7 |
@@ -119,19 +119,19 @@ hush: arith: syntax error | |||
119 | 2 2 | 119 | 2 2 |
120 | -2 -2 | 120 | -2 -2 |
121 | 1 1 | 121 | 1 1 |
122 | hush: arith: syntax error | 122 | hush: error in arithmetic |
123 | hush: arith: syntax error | 123 | hush: error in arithmetic |
124 | hush: arith: syntax error | 124 | hush: error in arithmetic |
125 | hush: arith: syntax error | 125 | hush: error in arithmetic |
126 | hush: arith: syntax error | 126 | hush: error in arithmetic |
127 | 5 5 | 127 | 5 5 |
128 | 1 1 | 128 | 1 1 |
129 | 4 4 | 129 | 4 4 |
130 | 0 0 | 130 | 0 0 |
131 | hush: arith: syntax error | 131 | hush: error in arithmetic |
132 | hush: arith: syntax error | 132 | hush: error in arithmetic |
133 | 8 12 | 133 | 8 12 |
134 | hush: arith: syntax error | 134 | hush: error in arithmetic |
135 | 42 | 135 | 42 |
136 | 42 | 136 | 42 |
137 | 42 | 137 | 42 |
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?}' |