]> diplodocus.org Git - nmh/blobdiff - test/post/test-sendfiles
Only add -Qunused-arguments to LDFLAGS if compiler is clang.
[nmh] / test / post / test-sendfiles
index cc4596075aea6b7d8f796b7b45062b7c22f08920..c5f08c004811c65d3a0ff8da61f8f91b7da79bbb 100755 (executable)
@@ -47,11 +47,11 @@ test_sendfiles ()
 
   if [ "$argstyle" = 'new' ]; then
     (cd "$MH_TEST_DIR"  &&
-     sendfiles "$@" -to recipient@example.com -subject "sendfiles test" \
-       "$testfile" >/dev/null 2>&1)
+     run_prog sendfiles "$@" -to recipient@example.com \
+       -subject "sendfiles test" "$testfile" >/dev/null 2>&1)
   elif [ "$argstyle" = 'old' ]; then
     (cd "$MH_TEST_DIR"  &&
-     sendfiles "$@" recipient@example.com "sendfiles test" \
+     run_prog sendfiles "$@" recipient@example.com "sendfiles test" \
        "$testfile" >/dev/null 2>&1)
   fi
 
@@ -60,7 +60,8 @@ test_sendfiles ()
   inc -silent -file "$mbox"
   rm -f "$mbox" "$mbox.map"
 
-  mhlist -verbose last | sed -e 's/ *$//' >"$actual"
+  mhlist -verbose last | sed -e 's/ *$//' -e 's/\(octet-stream\).*$/\1/' \
+    >"$actual"
   (cd $MH_TEST_DIR/tmp  &&
    contents=`mhstore -noauto last 2>&1 | \
              sed -e 's/storing message.*as file //'`  &&
@@ -80,7 +81,7 @@ Usage: sendfiles [switches] -to recipient -subject subject file1 [file2 ...]
   or
        sendfiles [switches] recipient subject file1 [file2 ...]
   switches are:
-  -compress [bzip2 | compress | gzip | lzma | none | zip]
+  -compress [bzip2 | compress | gzip | lzma | none]
   -from <sender>
   -[delay] <delay> (expressed in seconds)
   -version
@@ -88,7 +89,7 @@ Usage: sendfiles [switches] -to recipient -subject subject file1 [file2 ...]
   Can use PERSON environment variable instead of -from switch.
 EOF
 
-sendfiles -help >"$actual" 2>&1
+run_prog sendfiles -help >"$actual" 2>&1
 check "$expected" "$actual"
 
 # check -version
@@ -104,7 +105,7 @@ run_test 'sendfiles -nonexistent' "Usage: sendfiles [switches] -to recipient \
   or
        sendfiles [switches] recipient subject file1 [file2 ...]
   switches are:
-  -compress [bzip2 | compress | gzip | lzma | none | zip]
+  -compress [bzip2 | compress | gzip | lzma | none]
   -from <sender>
   -[delay] <delay> (expressed in seconds)
   -version
@@ -119,7 +120,7 @@ Usage: sendfiles [switches] -to recipient \
   or
        sendfiles [switches] recipient subject file1 [file2 ...]
   switches are:
-  -compress [bzip2 | compress | gzip | lzma | none | zip]
+  -compress [bzip2 | compress | gzip | lzma | none]
   -from <sender>
   -[delay] <delay> (expressed in seconds)
   -version
@@ -136,12 +137,11 @@ Usage: sendfiles [switches] -to recipient \
 [ "`findprog gzip`" ]      &&  test_sendfiles 'gzip -cd' new -compress gzip
 [ "`findprog gzip`" ]      &&  test_sendfiles 'gzip -cd' new -gzip
 [ "`findprog lzma`" ]      &&  test_sendfiles 'lzma -cd' new -compress lzma
-[ "`findprog zip`" ]       &&  test_sendfiles 'unzip -p' new -compress zip
 
 # check with no compression
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
-  11       application/octet-stream   10K
+  11       application/octet-stream
             type="tar"
             (extract with cat | tar xvpf -)
 EOF
@@ -151,7 +151,7 @@ test_sendfiles cat new -compress none
 # check with no compression, -none
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
-  11       application/octet-stream   10K
+  11       application/octet-stream
             type="tar"
             (extract with cat | tar xvpf -)
 EOF
@@ -161,7 +161,7 @@ test_sendfiles cat new -none
 # check old argument style (without -to and -subject)
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
-  11       application/octet-stream   10K
+  11       application/octet-stream
             type="tar"
             (extract with cat | tar xvpf -)
 EOF
@@ -171,7 +171,7 @@ test_sendfiles cat old -compress none
 # check -from
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
-  11       application/octet-stream   10K
+  11       application/octet-stream
             type="tar"
             (extract with cat | tar xvpf -)
 EOF
@@ -181,7 +181,7 @@ test_sendfiles cat new -compress none -from 'Sender <sender@example.com>'
 # check PERSON environment variable
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
-  11       application/octet-stream   10K
+  11       application/octet-stream
             type="tar"
             (extract with cat | tar xvpf -)
 EOF
@@ -191,7 +191,7 @@ PERSON='Sender <sender@example.com>' test_sendfiles cat new -compress none
 # check -delay, though for a small file it doesn't do anything
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
-  11       application/octet-stream   10K
+  11       application/octet-stream
             type="tar"
             (extract with cat | tar xvpf -)
 EOF
@@ -201,7 +201,7 @@ test_sendfiles cat new -compress none -delay 5
 # check old style -delay, though for a small file it doesn't do anything
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
-  11       application/octet-stream   10K
+  11       application/octet-stream
             type="tar"
             (extract with cat | tar xvpf -)
 EOF