summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-07-13 06:13:33 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-07-13 06:15:02 (GMT)
commitbd46cf8d48852639e10e66a87500f7b9ec18e1ef (patch) (side-by-side diff)
tree022b96e5b0c88471369abd4784b566dbd9637719
parentb696daa86b51a38841e4c39bce0a46eaac2f1db4 (diff)
downloadmailutils-bd46cf8d48852639e10e66a87500f7b9ec18e1ef.tar.gz
mailutils-bd46cf8d48852639e10e66a87500f7b9ec18e1ef.tar.bz2
Fixes in the mail testsute
* mail/tests/copy00.at: Fix description. Skip test if /dev/stdout cannot be locked. * mail/tests/copy03.at: Rename MBOX to avoid name clashes on case-insensitive file systems.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mail/tests/copy00.at22
-rw-r--r--mail/tests/copy03.at4
2 files changed, 20 insertions, 6 deletions
diff --git a/mail/tests/copy00.at b/mail/tests/copy00.at
index 3803910..ae003dd 100644
--- a/mail/tests/copy00.at
+++ b/mail/tests/copy00.at
@@ -17,15 +17,29 @@
AT_SETUP([copy to stdout])
AT_KEYWORDS([copy copy00])
-# Description: Check if COLUMNS setting is honored
+# Description: Check if copying to /dev/stdout works.
# Reported-By: Dan Jacobson <jidanni@jidanni.org>
-# References: <87vbgemcc7.fsf@jidanni.org>,
-# http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html
+# References: <87wq0tazcr.fsf@jidanni.org>,
+# https://lists.gnu.org/archive/html/bug-mailutils/2015-05/msg00002.html
AT_CHECK([
test -f /dev/stdout || AT_SKIP_TEST
MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox)
-echo 'copy 1 /dev/stdout' | MUT_MAIL_CMD -N -E 'set readonly' -f ./mbox | sed 's/ *$//;/^Held 1 message/d';
+echo 'copy 1 /dev/stdout' | \
+ MUT_MAIL_CMD -N -E 'set readonly' -f ./mbox 2>err | \
+ sed 's/ *$//;/^Held 1 message/d'
+
+if test -s err; then
+ # On OSX. /dev/stdout cannot be locked.
+ # Reported by Chris Weichenberger on Thu, 11 Jul 2019 18:04:06 +0200
+ # in private correspondence. See <20190711160406.picxk2geuqxjh2mx@X>
+ sed -e '/Cannot lock \/dev\/stdout/d' err >err2
+ if test -s err2; then
+ cat err2 >&2
+ else
+ AT_SKIP_TEST
+ fi
+fi
],
[0],
[From gray@example.net Tue Jul 16 12:11:35 2002
diff --git a/mail/tests/copy03.at b/mail/tests/copy03.at
index 100e04f..ccfd02b 100644
--- a/mail/tests/copy03.at
+++ b/mail/tests/copy03.at
@@ -25,11 +25,11 @@ AT_KEYWORDS([copy copy03])
AT_CHECK([
MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox)
mkdir folder
-MBOX=`pwd`/MBOX
+MBOX=`pwd`/COPY
export MBOX
echo 'copy 1 &' | dnl
MUT_MAIL_CMD -N -E "set folder=\"$folder\"" -f ./mbox | dnl
- sed 's/ *$//;/^Held 1 message/d;s|'$MBOX'|MBOX|'
+ sed -e 's/ *$//' -e '/^Held 1 message/d' -e "s|$MBOX|MBOX|"
test -f $MBOX || exit 1
cmp $MBOX $abs_top_srcdir/testsuite/spool/mbox
],

Return to:

Send suggestions and report system problems to the System administrator.