summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-09 19:16:15 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-09 19:16:15 +0000
commit05d3b7cc0de2283f149b07196f1ca0557c062323 (patch)
tree4bd8a4d447086c3aebc675400d3925806adf2520 /shell/hush_test
parent1943aec2ec390d9fda159aa0412362780ec83f09 (diff)
downloadbusybox-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')
-rw-r--r--shell/hush_test/hush-arith/arith.right54
-rw-r--r--shell/hush_test/hush-vars/param_expand_assign.right8
-rw-r--r--shell/hush_test/hush-vars/param_expand_indicate_error.right10
-rwxr-xr-xshell/hush_test/hush-vars/param_expand_indicate_error.tests10
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'
5530 30 5530 30
5620 20 5620 20
5730 30 5730 30
58hush: arith: syntax error 58hush: error in arithmetic
596 6 596 6
606,5,3 6,5,3 606,5,3 6,5,3
61263 263 61263 263
62255 255 62255 255
6340 40 6340 40
64hush: arith: syntax error 64hush: error in arithmetic
65hush: arith: divide by zero 65hush: divide by 0
66hush: can't exec 'let': No such file or directory 66hush: can't exec 'let': No such file or directory
67hush: arith: syntax error 67hush: error in arithmetic
68hush: can't exec 'let': No such file or directory 68hush: can't exec 'let': No such file or directory
69abc 69abc
70def 70def
71ghi 71ghi
72hush: arith: syntax error 72hush: error in arithmetic
7316 16 7316 16
74hush: arith: syntax error 74hush: error in arithmetic
75hush: arith: syntax error 75hush: error in arithmetic
76hush: arith: syntax error 76hush: error in arithmetic
779 9 779 9
78hush: arith: syntax error 78hush: error in arithmetic
79hush: arith: syntax error 79hush: error in arithmetic
809 9 809 9
819 9 819 9
829 9 829 9
@@ -97,18 +97,18 @@ hush: arith: syntax error
973 3 973 3
984 4 984 4
994 4 994 4
100hush: arith: syntax error 100hush: error in arithmetic
101hush: arith: syntax error 101hush: error in arithmetic
102hush: arith: syntax error 102hush: error in arithmetic
103hush: arith: syntax error 103hush: error in arithmetic
104hush: arith: syntax error 104hush: error in arithmetic
1054 4 1054 4
1067 7 1067 7
107-7 -7 107-7 -7
108hush: arith: syntax error 108hush: error in arithmetic
109hush: arith: syntax error 109hush: error in arithmetic
110hush: arith: syntax error 110hush: error in arithmetic
111hush: arith: syntax error 111hush: error in arithmetic
1126 6 1126 6
1133 3 1133 3
1147 7 1147 7
@@ -119,19 +119,19 @@ hush: arith: syntax error
1192 2 1192 2
120-2 -2 120-2 -2
1211 1 1211 1
122hush: arith: syntax error 122hush: error in arithmetic
123hush: arith: syntax error 123hush: error in arithmetic
124hush: arith: syntax error 124hush: error in arithmetic
125hush: arith: syntax error 125hush: error in arithmetic
126hush: arith: syntax error 126hush: error in arithmetic
1275 5 1275 5
1281 1 1281 1
1294 4 1294 4
1300 0 1300 0
131hush: arith: syntax error 131hush: error in arithmetic
132hush: arith: syntax error 132hush: error in arithmetic
1338 12 1338 12
134hush: arith: syntax error 134hush: error in arithmetic
13542 13542
13642 13642
13742 13742
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}
2hush: syntax error: unterminated ${name} 2hush: syntax error: unterminated ${name}
30 30
40 40
5hush: 1: special vars cannot assign in this way 5hush: $1: cannot assign in this way
6hush: 1: special vars cannot assign in this way 6hush: $1: cannot assign in this way
7hush: 1: special vars cannot assign in this way 7hush: $1: cannot assign in this way
8hush: 1: special vars cannot assign in this way 8hush: $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_
6hush: 1: parameter null or not set 6hush: 1: parameter null or not set
7hush: 1: parameter null or not set 7hush: 1: parameter null or not set
8hush: 1: word 8hush: 1: message1
9hush: 1: word 9hush: 1: message1
10_aaaa 10_aaaa
11_aaaa 11_aaaa
12_aaaa 12_aaaa
@@ -15,13 +15,13 @@ _aaaa
15_ 15_
16hush: f: parameter null or not set 16hush: f: parameter null or not set
17hush: f: parameter null or not set 17hush: f: parameter null or not set
18hush: f: word 18hush: f: message3
19hush: f: word 19hush: f: message3
20_ 20_
21_ 21_
22hush: f: parameter null or not set 22hush: f: parameter null or not set
23_ 23_
24hush: f: word 24hush: 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?}'