]> diplodocus.org Git - nmh/commitdiff
Fixed test-mhmail failure on Solaris: its tail doesn't suport -n.
authorDavid Levine <levinedl@acm.org>
Thu, 5 Dec 2013 03:13:55 +0000 (21:13 -0600)
committerDavid Levine <levinedl@acm.org>
Thu, 5 Dec 2013 03:13:55 +0000 (21:13 -0600)
test/mhmail/test-mhmail
uip/mhmail

index 1caf0399711fcd6b49b376094dec6eaa427ed8f3..31d6689e6697ec2f088ba766590819798d6464ee 100755 (executable)
@@ -114,10 +114,6 @@ esac
 
 # check -nosend
 # Not supported by compiled mhmail.
-#### TEMPORARY hack to diagnose failure on Solaris.
-echo before
-sh -x mhmail -nosend recipient@example.com -from sender1@localhost -body '' 2>&1
-echo after
 mhmail -nosend recipient@example.com -from sender1@localhost \
   -server 127.0.0.1 -port $localport -body '' >"$actual" 2>"$actual_err"
 
index 839b82a70d627baaffbbafe725774a9c946bb41d..70758cd6902bc607e6efc2fdc5256086a523e887 100755 (executable)
@@ -50,6 +50,11 @@ finddir() {
 
 bindir=`finddir $0`
 nmhbindir=`cd "$bindir" && pwd`
+if printf 'OK\n' | tail -n 1 2>&1 | grep OK >/dev/null; then
+    tail='tail -n'
+else
+    tail=tail
+fi
 
 
 #### Checks for missing mandatory arguments.