]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/intl.tests
Bash-4.4 distribution sources and documentation
[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' "$*"
a0c0a00f
CR
38
39. ./test-glue-functions
40
41printf '%s' "$*" | od -b | _intl_normalize_spaces
3185942a
JA
42
43# display differences make this problematic
44${THIS_SH} ./intl1.sub
495aee44
CR
45
46# this tests both international handling in printf and temporary environments
47${THIS_SH} ./intl2.sub
ac50fbac 48
a0c0a00f
CR
49# test splitting on characters instead of bytes
50${THIS_SH} ./intl3.sub
51
ac50fbac
CR
52${THIS_SH} ./unicode1.sub 2>/dev/null
53${THIS_SH} ./unicode2.sub
54
55${THIS_SH} ./unicode3.sub 2>&1