Fix test/tests/send/test-mimeify
[mmh] / test / common.sh
index 805afea..b869d56 100644 (file)
@@ -52,6 +52,12 @@ require_locale()
        test_skip "no suitable locale available"
 }
 
+# Do a best guess at FQDN
+mh_hostname()
+{
+       hostname -f 2>/dev/null || uname -n
+}
+
 # Some stuff for doing silly progress indicators
 progress_update()
 {
@@ -74,6 +80,12 @@ progress_done()
 }
 
 
+#### Replace generated Content-ID headers with static value
+replace_contentid()
+{
+       sed "/^Content-ID/s/:.*/: <TESTID>/" "$@"
+}
+
 
 #### Filter that squeezes blank lines, partially emulating GNU cat -s,
 #### but sufficient for our purpose.