shell: better support of [[ ]] bashism
Still rather rudimentary for ash function old new delta binop 433 589 +156 check_operator 65 101 +36 done_word 736 769 +33 test_main 405 418 +13 parse_stream 2227 2238 +11 ops_texts 124 133 +9 ops_table 80 86 +6 run_pipe 1557 1562 +5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/0 up/down: 269/0) Total: 269 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
7
shell/hush_test/hush-test2/andor1.tests
Executable file
7
shell/hush_test/hush-test2/andor1.tests
Executable file
@@ -0,0 +1,7 @@
|
||||
e=''
|
||||
[[ a && b ]] && echo 1:YES
|
||||
[[ a && '' ]] || echo 2:no
|
||||
[[ a || b ]] && echo 3:YES
|
||||
[[ '' || b ]] && echo 4:YES
|
||||
[[ "" || "$e" ]] || echo 5:no
|
||||
[[ "" || $e ]] || echo 6:no
|
Reference in New Issue
Block a user