]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: sort: add a test for equivalent floats master
authorPádraig Brady <P@draigBrady.com>
Sat, 12 Jul 2025 18:58:06 +0000 (19:58 +0100)
committerPádraig Brady <P@draigBrady.com>
Sat, 12 Jul 2025 18:58:06 +0000 (19:58 +0100)
* tests/sort/sort-float.sh: Ensure equivalent floats
are treated as such.

tests/sort/sort-float.sh

index 433a2197040072b54cac65dc66dab1bd1bcf7306..1439edd703d0c28ee4a4cd0aba9d811bec0acd96 100755 (executable)
@@ -94,4 +94,7 @@ $LDBL_MAX
   compare exp out || fail=1
 done
 
+# Ensure equal floats are treated as such
+test $(printf '%s\n' 10 1e1  | sort -gu | wc -l) = 1 || fail=1
+
 Exit $fail