aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/src/fns-tests.el28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 0c6edb89252..861736995f4 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -192,19 +192,19 @@
192 a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8"))))) 192 a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
193 '("Adrian" "Ævar" "Agustín" "Eli")))) 193 '("Adrian" "Ævar" "Agustín" "Eli"))))
194 194
195(ert-deftest fns-tests-string-numeric-lessp () 195(ert-deftest fns-tests-string-version-lessp ()
196 (should (string-numeric-lessp "foo2.png" "foo12.png")) 196 (should (string-version-lessp "foo2.png" "foo12.png"))
197 (should (not (string-numeric-lessp "foo12.png" "foo2.png"))) 197 (should (not (string-version-lessp "foo12.png" "foo2.png")))
198 (should (string-numeric-lessp "foo12.png" "foo20000.png")) 198 (should (string-version-lessp "foo12.png" "foo20000.png"))
199 (should (not (string-numeric-lessp "foo20000.png" "foo12.png"))) 199 (should (not (string-version-lessp "foo20000.png" "foo12.png")))
200 (should (string-numeric-lessp "foo.png" "foo2.png")) 200 (should (string-version-lessp "foo.png" "foo2.png"))
201 (should (not (string-numeric-lessp "foo2.png" "foo.png"))) 201 (should (not (string-version-lessp "foo2.png" "foo.png")))
202 (should (equal (sort '("foo12.png" "foo2.png" "foo1.png") 202 (should (equal (sort '("foo12.png" "foo2.png" "foo1.png")
203 'string-numeric-lessp) 203 'string-version-lessp)
204 '("foo1.png" "foo2.png" "foo12.png"))) 204 '("foo1.png" "foo2.png" "foo12.png")))
205 (should (string-numeric-lessp "foo2" "foo1234")) 205 (should (string-version-lessp "foo2" "foo1234"))
206 (should (not (string-numeric-lessp "foo1234" "foo2"))) 206 (should (not (string-version-lessp "foo1234" "foo2")))
207 (should (string-numeric-lessp "foo.png" "foo2")) 207 (should (string-version-lessp "foo.png" "foo2"))
208 (should (string-numeric-lessp "foo1.25.5.png" "foo1.125.5")) 208 (should (string-version-lessp "foo1.25.5.png" "foo1.125.5"))
209 (should (string-numeric-lessp "2" "1245")) 209 (should (string-version-lessp "2" "1245"))
210 (should (not (string-numeric-lessp "1245" "2")))) 210 (should (not (string-version-lessp "1245" "2"))))