]>
git.ipfire.org Git - thirdparty/git.git/blob - t/perf/p0071-sort.sh
3 test_description
='Basic sort performance tests'
8 test_expect_success
'setup' '
9 git ls-files --stage "*.[ch]" "*.sh" |
11 git cat-file --batch >unsorted
14 test_perf
'sort(1) unsorted' '
15 sort <unsorted >sorted
18 test_expect_success
'reverse' '
19 sort -r <unsorted >reversed
22 for file in sorted reversed
24 test_perf
"sort(1) $file" "
29 for file in unsorted sorted reversed
32 test_perf
"string_list_sort() $file" "
33 test-tool string-list sort <$file >actual
36 test_expect_success
"string_list_sort() $file sorts like sort(1)" "
37 test_cmp_bin sorted actual
41 for file in unsorted sorted reversed
43 test_perf
"llist_mergesort() $file" "
44 test-tool mergesort sort <$file >actual
47 test_expect_success
"llist_mergesort() $file sorts like sort(1)" "
48 test_cmp_bin sorted actual