a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
'("Adrian" "Ævar" "Agustín" "Eli"))))
-(ert-deftest fns-tests-string-numeric-lessp ()
- (should (string-numeric-lessp "foo2.png" "foo12.png"))
- (should (not (string-numeric-lessp "foo12.png" "foo2.png")))
- (should (string-numeric-lessp "foo12.png" "foo20000.png"))
- (should (not (string-numeric-lessp "foo20000.png" "foo12.png")))
- (should (string-numeric-lessp "foo.png" "foo2.png"))
- (should (not (string-numeric-lessp "foo2.png" "foo.png")))
+(ert-deftest fns-tests-string-version-lessp ()
+ (should (string-version-lessp "foo2.png" "foo12.png"))
+ (should (not (string-version-lessp "foo12.png" "foo2.png")))
+ (should (string-version-lessp "foo12.png" "foo20000.png"))
+ (should (not (string-version-lessp "foo20000.png" "foo12.png")))
+ (should (string-version-lessp "foo.png" "foo2.png"))
+ (should (not (string-version-lessp "foo2.png" "foo.png")))
(should (equal (sort '("foo12.png" "foo2.png" "foo1.png")
- 'string-numeric-lessp)
+ 'string-version-lessp)
'("foo1.png" "foo2.png" "foo12.png")))
- (should (string-numeric-lessp "foo2" "foo1234"))
- (should (not (string-numeric-lessp "foo1234" "foo2")))
- (should (string-numeric-lessp "foo.png" "foo2"))
- (should (string-numeric-lessp "foo1.25.5.png" "foo1.125.5"))
- (should (string-numeric-lessp "2" "1245"))
- (should (not (string-numeric-lessp "1245" "2"))))
+ (should (string-version-lessp "foo2" "foo1234"))
+ (should (not (string-version-lessp "foo1234" "foo2")))
+ (should (string-version-lessp "foo.png" "foo2"))
+ (should (string-version-lessp "foo1.25.5.png" "foo1.125.5"))
+ (should (string-version-lessp "2" "1245"))
+ (should (not (string-version-lessp "1245" "2"))))