2 # Bash needed for the character encodings below.
4 # Run checks for ./isutf8.
6 # Lars Wirzenius <liw@iki.fi>
11 printf "$2" | .
/isutf8
-q
13 if [ $ret != $1 ]; then
20 printf "$2" > check-isutf8.tmp.$$
21 .
/isutf8
-q check-isutf8.tmp.$$
23 rm -f check-isutf8.tmp.$$
24 if [ $ret != $1 ]; then
25 echo "Failure (from file):"
42 check
1 '\xed\xa0\x88\xed\xbd\x85' # UTF-16 surrogates
43 check
1 '\xef\xbf\xbe' # 0xFFFE
44 check
1 '\xef\xbf\xbf' # 0xFFFF