summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-01-27 07:17:16 +0000
committerPádraig Brady <P@draigBrady.com>2011-01-29 23:39:16 +0000
commit877ca5bf8588ae73a6ccc672e41f13c5b3943b14 (patch)
treeaecfb3505bf785ccb775305fb49bf89d712b0fa9 /tests/misc
parent32626bde6d68508109a99dfe0a089a0025f56085 (diff)
downloadcoreutils-877ca5bf8588ae73a6ccc672e41f13c5b3943b14.tar.xz
join: don't report disorder against an empty file
This allows one to use join as a field extractor like: join -a1 -o 1.3,1.1 - /dev/null * src/join.c (join): Don't flag unpairable lines when one of the files is empty. * tests/misc/join: Add a new test for empty input, and adjust a previous test that was only checking against empty input. * doc/coreutils.texi (join invocation): Document the change. * NEWS: Likewise.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/join6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/misc/join b/tests/misc/join
index 5086ee75e..eae3f18a8 100755
--- a/tests/misc/join
+++ b/tests/misc/join
@@ -209,7 +209,11 @@ my @tv = (
# Before 6.10.143, this would mistakenly fail with the diagnostic:
# join: File 1 is not in sorted order
-['chkodr-7', '-12', ["2 a\n1 b\n", ""], "", 0],
+['chkodr-7', '-12', ["2 a\n1 b\n", "2 c\n1 d"], "", 0],
+
+# After 8.9, join doesn't report disorder by default
+# when comparing against an empty input file.
+['chkodr-8', '', ["2 a\n1 b\n", ""], "", 0],
# Test '--header' feature
['header-1', '--header',