]> git.marmaro.de Git - mmh/blobdiff - test/post/test-post-common.sh
Clean up fakesmtp and the post tests a bit to hopefully reduce race
[mmh] / test / post / test-post-common.sh
index 7698b81cf9d37c3dc6d49556a6888cd4dd84794e..e0eaa4ac0e1c634f9f747ff82efaea4b1b597e12 100755 (executable)
@@ -29,7 +29,7 @@ test_post ()
 
     send -draft -server 127.0.0.1 -port $localport || exit 1
 
-    wait $!
+    wait ${pid}
 
     #
     # It's hard to calculate the exact Date: header post is going to
@@ -37,7 +37,9 @@ test_post ()
     # compare it against our "correct" output.
     #
 
-    sed -i "" -e 's/^Date:.*/Date:/' "$1"
+    sed -i.bak -e 's/^Date:.*/Date:/' "$1"
+
+    rm -f "${1}.bak"
 
     check "$1" "$2"
 }