]> diplodocus.org Git - nmh/blobdiff - test/mhshow/test-charset
test-charset: Divulge mhshow output if iconv_open(3) doesn't gripe.
[nmh] / test / mhshow / test-charset
index e87f0a5151ca096930c9c6e936f520c6d25d8833..79e8d52757ddcdbda5bd6af2ff06fb25f87400a2 100755 (executable)
@@ -146,10 +146,13 @@ EOF
 run_prog mhshow $msgnum > $actual 2>&1
 if [ $iconv_elides_question_marks -eq 1 ]; then
     check "$expected" "$actual"
+elif grep "Can't convert .*us-ascii to UTF-8" "$actual" >/dev/null; then
+    :
 else
-    grep "Can't convert .*us-ascii to UTF-8" "$actual" >/dev/null  ||  failed=1
+    echo 'iconv complaint not found'
+    sed -n l "$actual"
+    failed=1
 fi
 
-
 finish_test
 exit $failed