OILS / spec / ysh-glob.test.sh View on Github | oils.pub

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