1
Fork 0
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:
Nathan Ross 2016-08-03 06:52:39 -04:00 committed by GitHub
commit 63c17e5b42
6 changed files with 66 additions and 6 deletions

View file

@ -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

View file

@ -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

View 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
View 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

View file

@ -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", "");