diff mbox series

[8/9] p0071: test performance of llist_mergesort()

Message ID 9ecbd8c8-2907-7955-0b85-f9bbae8475d1@web.de (mailing list archive)
State New, archived
Headers show
Series mergesort: improve tests and performance | expand

Commit Message

René Scharfe Oct. 1, 2021, 9:19 a.m. UTC
Signed-off-by: René Scharfe <l.s.r@web.de>
---
 t/perf/p0071-sort.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

--
2.33.0
diff mbox series

Patch

diff --git a/t/perf/p0071-sort.sh b/t/perf/p0071-sort.sh
index 5b39b68f35..ed366e2e12 100755
--- a/t/perf/p0071-sort.sh
+++ b/t/perf/p0071-sort.sh
@@ -38,4 +38,15 @@  do
 	"
 done

+for file in unsorted sorted reversed
+do
+	test_perf "llist_mergesort() $file" "
+		test-tool mergesort sort <$file >actual
+	"
+
+	test_expect_success "llist_mergesort() $file sorts like sort(1)" "
+		test_cmp_bin sorted actual
+	"
+done
+
 test_done