]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/intl.tests
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / intl.tests
CommitLineData
3185942a 1export LC_ALL=en_US.UTF-8
95732b49
JA
2
3a=$'\303\251'
4
5echo "$a"
6
7echo ${#a}
8
9b=$'A\303\251B'
10
11echo "$b"
12
13echo ${b: -1}
14
15c=AeB
16
17echo ${c: -1}
18
19unset a
20a=$(printf '%b' 'A\303\251B')
21IFS=$(printf '%b' '\303\251')
22
23case "$a" in
24"A${IFS}B") echo ok 1 ;;
25*) echo bad 1 ;;
26esac
27
28set $a
29
30case $1 in
31A) echo ok 2 ;;
32*) echo bad 2 ;;
33esac
34
35set a b
36
37printf '%s\n' "$*"
495aee44
CR
38# squeeze out blanks to avoid white space differences in od implementations
39printf '%s' "$*" | od -b | ( IFS=$' \t\n' ; while read line; do echo $line; done; )
3185942a
JA
40
41# display differences make this problematic
42${THIS_SH} ./intl1.sub
495aee44
CR
43
44# this tests both international handling in printf and temporary environments
45${THIS_SH} ./intl2.sub
ac50fbac
CR
46
47${THIS_SH} ./unicode1.sub 2>/dev/null
48${THIS_SH} ./unicode2.sub
49
50${THIS_SH} ./unicode3.sub 2>&1