diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2015-02-20 08:10:51 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2015-02-20 14:00:41 +0100 |
commit | 7ceaf1d975a17d07f1704d8edf4476218148cfba (patch) | |
tree | 81aa51f01ff422b9a7224372c27236a63eb26b40 /tests/misc/tee-dash.sh | |
parent | 3f2f05f06763d79a7cab525a3ea2d726df3e3736 (diff) | |
download | coreutils-7ceaf1d975a17d07f1704d8edf4476218148cfba.tar.xz |
tee: treat '-' operand as file name as mandated by POSIX
Since v5.2.1-1247-g8dafbe5, tee(1) treated '-' as stdout while POSIX
explicitly requires to treat this as a file name. Revert this change,
as the interleaved output - due to sending another copy of input to
stdout - is not considered to be useful. Discussed in
http://lists.gnu.org/archive/html/coreutils/2015-02/msg00085.html
* src/tee.c (tee_files): Remove the special handling for "-" operands.
(usage): Remove the corresponding sentence.
* doc/coreutils.texi (common options): Remove the "tee -" example.
(tee invocation): Document that tee(1) now treats "-" as a file name.
* tests/misc/tee.sh: Add a test case for "tee -".
While at it, re-indent the above multi-argument processing case and
extend that to 13 operands, as POSIX mandates that, too.
* tests/misc/tee-dash.sh: Remove now-obsolete test.
* tests/local.mk (all_tests): Remove the above test.
* NEWS (Changes in behavior): Mention the change.
Diffstat (limited to 'tests/misc/tee-dash.sh')
-rwxr-xr-x | tests/misc/tee-dash.sh | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/misc/tee-dash.sh b/tests/misc/tee-dash.sh deleted file mode 100755 index 1063211cf..000000000 --- a/tests/misc/tee-dash.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# test for "tee -". - -# Copyright (C) 2005-2015 Free Software Foundation, Inc. - -# This program 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 of the License, or -# (at your option) any later version. - -# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. - -. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src -print_ver_ tee - -tee - </dev/null || fail=1 - -Exit $fail |