hush: fix bkslash+newline handling and number validation in ${NN} and ${#NN}
Entering "${1a}" into interactive shell was making it exit. function old new delta parse_dollar 824 958 +134 i_getch_and_eat_bkslash_nl - 44 +44 parse_expr 917 938 +21 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 199/0) Total: 199 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
4
shell/ash_test/ash-parsing/bkslash_newline4.right
Normal file
4
shell/ash_test/ash-parsing/bkslash_newline4.right
Normal file
@ -0,0 +1,4 @@
|
||||
1:1
|
||||
22:22
|
||||
3:3
|
||||
Ok:0
|
14
shell/ash_test/ash-parsing/bkslash_newline4.tests
Executable file
14
shell/ash_test/ash-parsing/bkslash_newline4.tests
Executable file
@ -0,0 +1,14 @@
|
||||
set -- 1 22 333
|
||||
echo 1:$\
|
||||
1
|
||||
echo 22:$\
|
||||
{\
|
||||
2\
|
||||
}
|
||||
echo 3:$\
|
||||
{\
|
||||
#\
|
||||
3\
|
||||
}
|
||||
echo Ok:$\
|
||||
?
|
Reference in New Issue
Block a user