doc: remove older ChangeLog items
[coreutils.git] / tests / join / join-utf8.sh
blob9af9e55ce23f60144b82dd52ee2136e92ced1fbc
1 #!/bin/sh
2 # Test join in a UTF-8 locale.
4 # Copyright 2023-2024 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
19 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
20 print_ver_ join
22 test "$LOCALE_FR_UTF8" != none || skip_ "French UTF-8 locale not available"
24 LC_ALL=$LOCALE_FR_UTF8
25 export LC_ALL
27 vertical_line='|'
28 multiplication_sign='×'
29 en_dash='–'
30 old_Persian_word_divider='𐏐'
32 tflag=
34 for s in \
35 ' ' \
36 "$vertical_line" \
37 "$multiplication_sign" \
38 "$en_dash" \
39 "$old_Persian_word_divider"
41 printf '0%sA\n1%sa\n2%sb\n4%sc\n' "$s" "$s" "$s" "$s" >a ||
42 framework_failure_
43 printf '0%sB\n1%sd\n3%se\n4%s\0f\n' "$s" "$s" "$s" "$s" >b ||
44 framework_failure_
45 join $tflag$s -a1 -a2 -eouch -o0,1.2,2.2 a b >out || fail=1
46 tflag=-t
47 printf '0%sA%sB\n1%sa%sd\n2%sb%souch\n3%souch%se\n4%sc%s\0f\n' \
48 "$s" "$s" "$s" "$s" "$s" "$s" "$s" "$s" "$s" "$s" >exp ||
49 framework_failure_
50 compare exp out || fail=1
51 done
53 Exit $fail