mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Merge pull request #932 from alsuren/sort--stable
implement sort --stable
This commit is contained in:
commit
63c17e5b42
6 changed files with 66 additions and 6 deletions
3
tests/fixtures/sort/month_default.expected
vendored
3
tests/fixtures/sort/month_default.expected
vendored
|
@ -3,5 +3,8 @@ Jan Lorem ipsum dolor sit amet
|
|||
mar laboris nisi ut aliquip ex ea
|
||||
May sed do eiusmod tempor incididunt
|
||||
JUN nostrud exercitation ullamco
|
||||
Jul 1 should remain 2,1,3
|
||||
Jul 2 these three lines
|
||||
Jul 3 if --stable is provided
|
||||
Oct ut labore et dolore magna aliqua
|
||||
Dec consectetur adipiscing elit
|
||||
|
|
3
tests/fixtures/sort/month_default.txt
vendored
3
tests/fixtures/sort/month_default.txt
vendored
|
@ -5,3 +5,6 @@ Oct ut labore et dolore magna aliqua
|
|||
N/A Ut enim ad minim veniam, quis
|
||||
JUN nostrud exercitation ullamco
|
||||
mar laboris nisi ut aliquip ex ea
|
||||
Jul 2 these three lines
|
||||
Jul 1 should remain 2,1,3
|
||||
Jul 3 if --stable is provided
|
||||
|
|
10
tests/fixtures/sort/month_stable.expected
vendored
Normal file
10
tests/fixtures/sort/month_stable.expected
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
N/A Ut enim ad minim veniam, quis
|
||||
Jan Lorem ipsum dolor sit amet
|
||||
mar laboris nisi ut aliquip ex ea
|
||||
May sed do eiusmod tempor incididunt
|
||||
JUN nostrud exercitation ullamco
|
||||
Jul 2 these three lines
|
||||
Jul 1 should remain 2,1,3
|
||||
Jul 3 if --stable is provided
|
||||
Oct ut labore et dolore magna aliqua
|
||||
Dec consectetur adipiscing elit
|
10
tests/fixtures/sort/month_stable.txt
vendored
Normal file
10
tests/fixtures/sort/month_stable.txt
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
Jan Lorem ipsum dolor sit amet
|
||||
Dec consectetur adipiscing elit
|
||||
May sed do eiusmod tempor incididunt
|
||||
Oct ut labore et dolore magna aliqua
|
||||
N/A Ut enim ad minim veniam, quis
|
||||
JUN nostrud exercitation ullamco
|
||||
mar laboris nisi ut aliquip ex ea
|
||||
Jul 2 these three lines
|
||||
Jul 1 should remain 2,1,3
|
||||
Jul 3 if --stable is provided
|
|
@ -41,6 +41,11 @@ fn test_month_default() {
|
|||
test_helper("month_default", "-M");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_month_stable() {
|
||||
test_helper("month_stable", "-Ms");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_default_unsorted_ints() {
|
||||
test_helper("default_unsorted_ints", "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue