#uni-byte
LC_ALL=C $prog '%04x\n' "'$($prog '\xe1')" >>out 2>>err
#valid multi-byte, with trailing
- LC_ALL=$f $prog '%04x\n' '"á"' >>out 2>>err
+ LC_ALL=$f $prog '%04x\n' '"á=' >>out 2>>err
#invalid multi-byte, with trailing
- LC_ALL=$f $prog '%04x\n' "'$($prog '\xe1')'" >>out 2>>err
+ LC_ALL=$f $prog '%04x\n' "'$($prog '\xe1')=" >>out 2>>err
)
cat <<\EOF > exp || framework_failure_
00e1
EOF
compare exp out || fail=1
+ # Disparate LC_CTYPE and LC_MESSAGES problematic on macos,
+ # so just look for character in warning message,
+ # and normalize to LC_MESSAGES=C
+ C_WARNING='printf: '\
+'warning: =: character(s) following character constant have been ignored'
+
+ sed "s/printf:.*=.*/$C_WARNING/" < err > c_err || framework_failure_
+
cat <<EOF > exp_err
-printf: warning: ": character(s) following character constant have been ignored
-printf: warning: ': character(s) following character constant have been ignored
+$C_WARNING
+$C_WARNING
EOF
- compare exp_err err || fail=1
+ compare exp_err c_err || fail=1
fi
Exit $fail