1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

sort: Version sort support

This commit is contained in:
palaviv 2016-06-14 20:33:09 +03:00
parent d4ffbe0526
commit 87455f998a
5 changed files with 35 additions and 0 deletions

4
tests/fixtures/sort/version.expected vendored Normal file
View file

@ -0,0 +1,4 @@
1.2.3-alpha
1.2.3-alpha2
1.12.4
11.2.3

4
tests/fixtures/sort/version.txt vendored Normal file
View file

@ -0,0 +1,4 @@
11.2.3
1.2.3-alpha2
1.2.3-alpha
1.12.4

View file

@ -47,6 +47,11 @@ fn test_numeric_unique_ints() {
test_helper("numeric_unsorted_ints_unique", "-nu");
}
#[test]
fn test_version() {
test_helper("version", "-V");
}
fn test_helper(file_name: &str, args: &str) {
let (at, mut ucmd) = testing(UTIL_NAME);
ucmd.arg(args);