summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorG.P. Halkes <buscom@ghalkes.nl>2007-01-06 09:49:47 +0100
committerJim Meyering <jim@meyering.net>2007-01-06 09:49:47 +0100
commit37bcc2770788d8fd9fd8cda3413a27dd131d9e22 (patch)
treebdf13bcd0a2e2038eb61ae220b76dda808ae49a2 /tests
parentab58de37e6e01b22acc49f72b109b6e910f5190a (diff)
downloadcoreutils-37bcc2770788d8fd9fd8cda3413a27dd131d9e22.tar.xz
* src/fmt.c (copy_rest): Correct prefix handling.
Don't elide a line with the prefix followed by only white space. (get_line): Move EOF-check to loop-termination condition. * tests/fmt/basic (pfx-1): Adjust test to expect desired result. (pfx-2): Remove test; its premise was contrary to the documentation.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/fmt/basic20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/fmt/basic b/tests/fmt/basic
index 77682f103..04938b860 100755
--- a/tests/fmt/basic
+++ b/tests/fmt/basic
@@ -2,7 +2,7 @@
# -*- perl -*-
# Basic tests for "fmt".
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -60,23 +60,11 @@ my @Tests =
. " is the first\noption; use -w N instead\n"
. "Try `fmt --help' for more information.\n" }, {EXIT => 1}],
- # With --prefix=P, Do not remove leading on lines without the prefix.
+ # With --prefix=P, do not remove leading space on lines without the prefix.
['pfx-1', qw (-p '>'),
{IN=> " 1\n 2\n\t3\n\t\t4\n> quoted\n> text\n"},
- # This is the buggy output (leading white space removed),
- # from coreutils-5.93.
- {OUT=> "1\n2\n3\n4\n> quoted text\n"}],
- # FIXME: this is the desired output
- # {OUT=> " 1\n 2\n\t3\n\t\t4\n> quoted text\n"}],
-
- # Like the above, but when two adjacent, non-prefixed lines have
- # the same indentation, ensure that they are formatted.
- ['pfx-2', qw (-p '>'),
- {IN=> " 1\n 2\n\t3\n\t4\n"},
- {OUT=> "1\n2\n3\n4\n"}],
- # FIXME: this is the desired output
- # {OUT=> " 1 2\n\t3 4\n"}],
- );
+ {OUT=> " 1\n 2\n\t3\n\t\t4\n> quoted text\n"}],
+);
my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE};