diff options
author | Pádraig Brady <P@draigBrady.com> | 2016-01-12 16:29:32 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2016-01-13 10:59:18 +0000 |
commit | b2eadd109c3a508011705761dfe24a35180d925d (patch) | |
tree | 7efae6e5d2ba65a74b2e22e1160f0dd6a4013ce6 /tests/misc/uniq.pl | |
parent | d44ae88199ebf44fe721c06621a7ffc442fa34be (diff) | |
download | coreutils-b2eadd109c3a508011705761dfe24a35180d925d.tar.xz |
join,sort,uniq: with -z, treat '\n' as a field separator
* NEWS: Mention the change in behavior.
* doc/coreutils.texi (newlineFieldSeparator): A new description,
referenced from ({join,sort,uniq} invocation).
* src/system.h (field_sep): A new inline function to determine
if a character is a field separator.
* src/join.c (usage): s/whitespace/blank/ to be more accurate
wrt which characters are field separators.
(xfields): s/isblank/field_sep/.
* src/sort.c (inittables): Likewise.
* src/uniq.c (find_field): Likewise.
* tests/misc/join.pl: Adjust -z test, and add a test/example
for processing the whole record with field processing.
* tests/misc/sort.pl: Add -z test cases, including case with '\n'.
* tests/misc/uniq.pl: Add -z -f test case with \n.
Diffstat (limited to 'tests/misc/uniq.pl')
-rwxr-xr-x | tests/misc/uniq.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/misc/uniq.pl b/tests/misc/uniq.pl index 2bc06b9d6..f028036be 100755 --- a/tests/misc/uniq.pl +++ b/tests/misc/uniq.pl @@ -95,6 +95,7 @@ my @Tests = ['3z', '-z', {IN=>"a\na"}, {OUT=>"a\na\0"}], ['4z', '-z', {IN=>"a\nb"}, {OUT=>"a\nb\0"}], ['5z', '-z', {IN=>"a\na\nb"}, {OUT=>"a\na\nb\0"}], + ['10z', '-z -f1', {IN=>"a\nb\n\0c\nb\n\0"}, {OUT=>"a\nb\n\0"}], ['20z', '-dz', {IN=>"a\na\n"}, {OUT=>""}], # Make sure that eight bit characters work |