X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fcommon.sh;h=b869d56dfed711f55fa77e1ddc7c68c3d14e44e0;hb=de6974ed610ffbfaff335021ea7e359e85c27cfa;hp=805afeafcc8e059c54e702b1a1f1b39dd9f71275;hpb=4112940aea5591648b03a81907408752c08b33aa;p=mmh diff --git a/test/common.sh b/test/common.sh index 805afea..b869d56 100644 --- a/test/common.sh +++ b/test/common.sh @@ -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/:.*/: /" "$@" +} + #### Filter that squeezes blank lines, partially emulating GNU cat -s, #### but sufficient for our purpose.