1 ## our_shell: ysh
2 ## oils_failures_allowed: 0
3
4 #### YSH doesn't respect LC_COLLATE for bash/zsh glob sort order
5
6 touch hello-test.sh hello_preamble.sh
7
8 # test/spec-common.sh sets LC_ALL=C.UTF_8
9 # BUG: YSH shouldn't have 'unset' either!
10 # unset LC_ALL
11 setglobal ENV.LC_ALL = ''
12
13 # TODO: need erase()
14 #call ENV->erase('LC_ALL')
15
16 bash -c 'echo bash hello*'
17
18 setglobal ENV.LC_COLLATE = 'en_US.UTF-8'
19 #env | grep LC_
20 echo '--- set LC_COLLATE to en_US'
21
22 # YSH
23 $[ENV.SH] -c 'echo "ysh " hello*'
24
25 if true; then
26 bash -c 'echo "bash" hello*'
27 #zsh -c 'echo "zsh " hello*'
28 fi
29
30 ## STDOUT:
31 bash hello-test.sh hello_preamble.sh
32 --- set LC_COLLATE to en_US
33 ysh hello-test.sh hello_preamble.sh
34 bash hello_preamble.sh hello-test.sh
35 ## END
36