mirror of
https://github.com/coreutils/coreutils.git
synced 2026-10-28 09:44:34 +08:00
tests: sort: check -b and -M skip only space and tab
* tests/sort/sort.pl (@Tests): Add test cases ensuring a leading \f or \r is not skipped by -b or -M, while space and tab still are. https://github.com/uutils/coreutils/pull/15647 Link: https://github.com/coreutils/coreutils/pull/388
This commit is contained in:
1 parent
c0684d5bbb
commit
782219ffa2
1 file changed
+7
@@ -437,6 +437,13 @@ my @Tests =
|
||||
['key-own-r-5', '-f -r -k1f', {IN=>"b\na\n"}, {OUT=>"a\nb\n"}],
|
||||
['key-own-r-6', '-r -n -k1n', {IN=>"10\n2\n"}, {OUT=>"2\n10\n"}],
|
||||
|
||||
# Only space and tab are skipped by -b and -M; a leading \f or \r
|
||||
# stays part of the key.
|
||||
['nonblank-leading-b1', '-k1b', {IN=>"a\n\fb\n"}, {OUT=>"\fb\na\n"}],
|
||||
['nonblank-leading-b2', '-k1b', {IN=>"a\n\rb\n"}, {OUT=>"\rb\na\n"}],
|
||||
['nonblank-leading-M1', '-M', {IN=>"\fFEB\nJAN\n"}, {OUT=>"\fFEB\nJAN\n"}],
|
||||
['nonblank-leading-M2', '-M', {IN=>"\rFEB\nJAN\n"}, {OUT=>"\rFEB\nJAN\n"}],
|
||||
['blank-leading-M1', '-M', {IN=>" \tFEB\nJAN\n"}, {OUT=>"JAN\n \tFEB\n"}],
|
||||
);
|
||||
|
||||
# Add _POSIX2_VERSION=199209 to the environment of each test
|
||||
|
||||
Reference in new issue
Block a user