]> diplodocus.org Git - nmh/blobdiff - test/comp/test-comp-format
mhbuild's fgetstr(): simplify source, logic untouched.
[nmh] / test / comp / test-comp-format
index 1f1f8c538439239cede8b7ce380d4e9967d2d5e2..f991b3c6084fd274e4e02aeaa41e68cb6fff9130 100755 (executable)
@@ -13,6 +13,8 @@ fi
 
 setup_test
 
 
 setup_test
 
+check_exit '-eq 1' comp - # gcov
+
 #
 # Create a test template file (we create one here just in case the master
 # one changes)
 #
 # Create a test template file (we create one here just in case the master
 # one changes)
@@ -30,20 +32,21 @@ EOF
 
 expected="${MH_TEST_DIR}/$$.expected"
 actual="${MH_TEST_DIR}/Mail/draft"
 
 expected="${MH_TEST_DIR}/$$.expected"
 actual="${MH_TEST_DIR}/Mail/draft"
-from="Mr Test User <test@user.com>"
-to1="User One <userone@test.com>"
-to2="User Two <usertwo@test.com>"
-cc1="CC User One <ccuserone@test.com>"
-cc2="CC User Two <ccusertwo@test.com>"
-cc3="CC User Three <ccuserthree@test.com>"
-cc4="CC User Four <ccuserfour@test.com>"
+from="Mr Test User <test@example.com>"
+to1="User One <userone@example.com>"
+to2="User Two <usertwo@example.com>"
+cc1="CC User One <ccuserone@example.com>"
+cc2="CC User Two <ccusertwo@example.com>"
+cc3="CC User Three <ccuserthree@example.com>"
+cc4="CC User Four <ccuserfour@example.com>"
 fcc1="+nosuchmailbox"
 fcc2="+nosuchmailbox2"
 subject="Totally bogus subject"
 
 cat > $expected <<EOF
 From: ${from}
 fcc1="+nosuchmailbox"
 fcc2="+nosuchmailbox2"
 subject="Totally bogus subject"
 
 cat > $expected <<EOF
 From: ${from}
-To: ${to1}, ${to2}
+To: ${to1},
+    ${to2}
 cc: ${cc1},
     ${cc2},
     ${cc3},
 cc: ${cc1},
     ${cc2},
     ${cc3},
@@ -53,6 +56,7 @@ Subject: ${subject}
 --------
 EOF
 
 --------
 EOF
 
+run_prog \
 comp -editor true -form "${form}" -from "${from}" -to "${to1}" -to "${to2}" \
     -cc "${cc1}" -cc "${cc2}" -cc "${cc3}" -cc "${cc4}" -fcc "${fcc1}" \
     -fcc "${fcc2}" -subject "${subject}" -width 60 -nowhatnowproc || exit 1
 comp -editor true -form "${form}" -from "${from}" -to "${to1}" -to "${to2}" \
     -cc "${cc1}" -cc "${cc2}" -cc "${cc3}" -cc "${cc4}" -fcc "${fcc1}" \
     -fcc "${fcc2}" -subject "${subject}" -width 60 -nowhatnowproc || exit 1