X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=test%2Fcommon.sh;h=9e6cb2269cebb0a0b7a08b55a43f102c87e22e86;hp=805afeafcc8e059c54e702b1a1f1b39dd9f71275;hb=9e6f6b822a6de620c0aab4b122937e2c598169ed;hpb=4112940aea5591648b03a81907408752c08b33aa diff --git a/test/common.sh b/test/common.sh index 805afea..9e6cb22 100644 --- a/test/common.sh +++ b/test/common.sh @@ -8,6 +8,17 @@ trap ' ' 0 1 2 15 failed=0 +#fake sleeps 60 secounds and then reads all input +mmh_test_fakepager() +{ + sleep 60 + + while read a + do + sleep 0 + done + exit 0 +} test_skip() { @@ -52,6 +63,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 +91,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.