OILS / spec / ysh-func-builtin.test.sh View on Github | oilshell.org

24 lines, 9 significant
1# spec/ysh-func
2
3## our_shell: ysh
4
5#### shSplit() respects IFS
6
7var s = ' aa a bb b '
8
9argv.py @[shSplit(s)]
10
11setvar IFS = 'a'
12
13argv.py @[shSplit(s)]
14
15setvar IFS = 'b'
16
17argv.py @[shSplit(s)]
18
19## STDOUT:
20['aa', 'a', 'bb', 'b']
21[' ', '', ' ', ' bb b ']
22[' aa a ', '', ' ', ' ']
23## END
24