From 29b9eb437937e4d89feed117bd4f5c5d34c961cf Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Fri, 3 Jun 2022 16:29:38 -0500 Subject: [PATCH] Add tests for case-(in)sensitive sorting --- t/bug78-case-insensitive.test | 8 ++++++++ t/bug78-case-sensitive.test | 8 ++++++++ t/case-sensitivity/Bob | 0 t/case-sensitivity/alice | 0 4 files changed, 16 insertions(+) create mode 100644 t/bug78-case-insensitive.test create mode 100644 t/bug78-case-sensitive.test create mode 100644 t/case-sensitivity/Bob create mode 100644 t/case-sensitivity/alice diff --git a/t/bug78-case-insensitive.test b/t/bug78-case-insensitive.test new file mode 100644 index 0000000..5943075 --- /dev/null +++ b/t/bug78-case-insensitive.test @@ -0,0 +1,8 @@ +#! /bin/bash +cat <<--- +This test checks that case-insensitive sorting works. +-- + +nginx_start 'fancyindex_case_sensitive off;' +content=$(fetch /case-sensitivity/) +grep -A 999 '\' <<< "${content}" | grep '\' # Bob is after alice diff --git a/t/bug78-case-sensitive.test b/t/bug78-case-sensitive.test new file mode 100644 index 0000000..ff9037d --- /dev/null +++ b/t/bug78-case-sensitive.test @@ -0,0 +1,8 @@ +#! /bin/bash +cat <<--- +This test checks that case-sensitive sorting works. +-- + +nginx_start 'fancyindex_case_sensitive on;' +content=$(fetch /case-sensitivity/) +grep -A 999 '\' <<< "${content}" | grep '\' # alice is after Bob diff --git a/t/case-sensitivity/Bob b/t/case-sensitivity/Bob new file mode 100644 index 0000000..e69de29 diff --git a/t/case-sensitivity/alice b/t/case-sensitivity/alice new file mode 100644 index 0000000..e69de29