summaryrefslogtreecommitdiff
path: root/tests/misc/comm
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-03-08 18:37:08 +0100
committerJim Meyering <meyering@redhat.com>2009-03-08 21:34:08 +0100
commit93f6771e82401f4c88219938602d4f09628301f4 (patch)
tree170525cc7c71e0d8c64d567c59a834b16a0e8910 /tests/misc/comm
parent83244ba3120b555dfa0df83a3b8bec0a16d415f6 (diff)
downloadcoreutils-93f6771e82401f4c88219938602d4f09628301f4.tar.xz
tests: add a test for newly-fixed bug in comm --check-order
* tests/misc/comm (ooo-prefix): Add a test for today's fix. * NEWS (Bug fixes): Mention it.
Diffstat (limited to 'tests/misc/comm')
-rwxr-xr-xtests/misc/comm9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/misc/comm b/tests/misc/comm
index 81a852944..80a0c2dd3 100755
--- a/tests/misc/comm
+++ b/tests/misc/comm
@@ -2,7 +2,7 @@
# -*- perl -*-
# Test comm
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2009 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
@@ -116,6 +116,13 @@ my @Tests =
{OUT => "\t\t2\n"},
{ERR => "$prog: file 1 is not in sorted order\n"}],
+ # out-of-order, line 2 is a prefix of line 1
+ # until coreutils-7.2, this test would fail -- no disorder detected
+ ['ooo-prefix', '--check-order', {IN=>{a=>"Xa\nX\n"}}, {IN=>{b=>""}},
+ {EXIT=>1},
+ {OUT => "Xa\n"},
+ {ERR => "$prog: file 1 is not in sorted order\n"}],
+
# alternate delimiter: ','
['delim-comma', '--output-delimiter=,', @inputs,
{OUT=>"1\n,2\n,,3\n"} ],