# This file is part of GNU Mailutils. -*- Autotest -*- # Copyright (C) 2015-2019 Free Software Foundation, Inc. # # GNU Mailutils is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3, or (at # your option) any later version. # # GNU Mailutils is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Mailutils. If not, see . AT_SETUP([copy to stdout]) AT_KEYWORDS([copy copy00]) # Description: Check if copying to /dev/stdout works. # Reported-By: Dan Jacobson # 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 2>err | \ sed -e 's/ *$//' -e '/^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 Organization: Mailutils-tests Received: from example.net (localhost [[127.0.0.1]]) by example.net with ESMTP id g6G9BZb00791 for ; Tue, 16 Jul 2002 12:11:35 +0300 Message-Id: <200207160911.g6G9BZb00791@example.net> To: Bar Subject: MBOX Date: Tue, 16 Jul 2002 12:11:35 +0300 From: Sergey Poznyakoff This is a sample user's mbox. "/dev/stdout" 14/438 ]) AT_CLEANUP