swh:1:snp:6df5a50b8107b6bbe1e51d0239d816a7503c536a
Raw File
Tip revision: 6ff7f460394745395f3eec1e414ad2300c6a402f authored by Johannes Schindelin on 12 February 2021, 14:50:05 UTC
Git 2.27.1
Tip revision: 6ff7f46
p0071-sort.sh
#!/bin/sh

test_description='Basic sort performance tests'
. ./perf-lib.sh

test_perf_default_repo

test_expect_success 'setup' '
	git ls-files --stage "*.[ch]" "*.sh" |
	cut -f2 -d" " |
	git cat-file --batch >unsorted
'

test_perf 'sort(1)' '
	sort <unsorted >expect
'

test_perf 'string_list_sort()' '
	test-tool string-list sort <unsorted >actual
'

test_expect_success 'string_list_sort() sorts like sort(1)' '
	test_cmp_bin expect actual
'

test_done
back to top