hush: support ${VAR:N:-M}
function old new delta expand_one_var 1602 1615 +13 builtin_type 114 116 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
23
shell/hush_test/hush-vars/var_bash1b.right
Normal file
23
shell/hush_test/hush-vars/var_bash1b.right
Normal file
@@ -0,0 +1,23 @@
|
||||
all |0123456
|
||||
4: |456
|
||||
4:2 |45
|
||||
4:-1 |45
|
||||
4:-2 |4
|
||||
4:-3 |
|
||||
-4: |3456
|
||||
-4:2 |34
|
||||
-4:-1 |345
|
||||
-4:-2 |34
|
||||
-4:-3 |3
|
||||
-4:-4 |
|
||||
-4:i=2 |34
|
||||
-4:i=-2|34
|
||||
-4:i=-3|3
|
||||
-4:i=-4|
|
||||
-5: |23456
|
||||
-6: |123456
|
||||
-7: |0123456
|
||||
-8: |
|
||||
-9: |
|
||||
-9:-99 |
|
||||
Ok:0
|
||||
Reference in New Issue
Block a user