003 File Manager
Current Path:
/usr/src/lib/libc/tests/regex
usr
/
src
/
lib
/
libc
/
tests
/
regex
/
š
..
š
Makefile
(167 B)
š
Makefile.depend
(325 B)
š
Makefile.inc
(1.75 KB)
š
multibyte.sh
(1.21 KB)
Editing: multibyte.sh
# $FreeBSD$ atf_test_case bmpat bmpat_head() { atf_set "descr" "Check matching multibyte characters (PR153502)" } bmpat_body() { export LC_CTYPE="C.UTF-8" printf 'Ʃ' | atf_check -o "inline:Ʃ" \ sed -ne '/^.$/p' printf 'ƩƩ' | atf_check -o "inline:ƩƩ" \ sed -ne '/^..$/p' printf 'aƩa' | atf_check -o "inline:aƩa" \ sed -ne '/a.a/p' printf 'aƩa'| atf_check -o "inline:aƩa" \ sed -ne '/a.*a/p' printf 'aaƩaa' | atf_check -o "inline:aaƩaa" \ sed -ne '/aa.aa/p' printf 'aƩaƩa' | atf_check -o "inline:aƩaƩa" \ sed -ne '/a.a.a/p' printf 'Ʃa' | atf_check -o "inline:Ʃa" \ sed -ne '/.a/p' printf 'aƩaa' | atf_check -o "inline:aƩaa" \ sed -ne '/a.aa/p' printf 'ƩaƩ' | atf_check -o "inline:ƩaƩ" \ sed -ne '/.a./p' } atf_test_case icase icase_head() { atf_set "descr" "Check case-insensitive matching for characters 128-255" } icase_body() { export LC_CTYPE="C.UTF-8" a=$(printf '\302\265\n') # U+00B5 b=$(printf '\316\234\n') # U+039C c=$(printf '\316\274\n') # U+03BC echo $b | atf_check -o "inline:$b\n" sed -ne "/$a/Ip" echo $c | atf_check -o "inline:$c\n" sed -ne "/$a/Ip" } atf_init_test_cases() { atf_add_test_case bmpat atf_add_test_case icase }
Upload File
Create Folder