]> diplodocus.org Git - nmh/commitdiff
test-charset: Divulge mhshow output if iconv_open(3) doesn't gripe.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 25 Jan 2018 00:16:15 +0000 (00:16 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 25 Jan 2018 14:44:44 +0000 (14:44 +0000)
Andy Bradford was finding the grep failed, but was left with no
explanation that's what happened, or what the file that didn't match
contained.

test/mhshow/test-charset

index e87f0a5..79e8d52 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"
 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
 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
 
 fi
 
-
 finish_test
 exit $failed
 finish_test
 exit $failed