summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-01-19 20:58:22 +0000
committerJim Meyering <jim@meyering.net>2006-01-19 20:58:22 +0000
commita74a458f5f6f45b166f899727e8db181b11cdb53 (patch)
tree1c2d71cd043bcde4535c17756267ec1a32f259e4 /tests
parentf8655e1804a5bc83aa1c931fd45b8181fe4c9201 (diff)
downloadcoreutils-a74a458f5f6f45b166f899727e8db181b11cdb53.tar.xz
(pfx-1, pfx-2): New tests, to demonstrate the bug
reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/fmt/basic17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/fmt/basic b/tests/fmt/basic
index 7d8916efd..ad536d116 100755
--- a/tests/fmt/basic
+++ b/tests/fmt/basic
@@ -40,6 +40,23 @@ my @Tests =
{ERR => "fmt: invalid option -- 7; -WIDTH is recognized only when it"
. " 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.
+ ['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"}],
);
my $save_temps = $ENV{DEBUG};