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
22 test "$LOCALE_FR_UTF8" != none || skip_
"French UTF-8 locale not available"
24 LC_ALL
=$LOCALE_FR_UTF8
28 multiplication_sign
='×'
30 old_Persian_word_divider
='𐏐'
37 "$multiplication_sign" \
39 "$old_Persian_word_divider"
41 printf '0%sA\n1%sa\n2%sb\n4%sc\n' "$s" "$s" "$s" "$s" >a ||
43 printf '0%sB\n1%sd\n3%se\n4%s\0f\n' "$s" "$s" "$s" "$s" >b ||
45 join $tflag$s -a1 -a2 -eouch -o0,1.2,2.2 a b
>out || fail
=1
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 ||
50 compare exp out || fail
=1