diff options
| author | Mattias Engdegård | 2024-04-28 23:17:48 +0200 |
|---|---|---|
| committer | Mattias Engdegård | 2024-04-29 14:29:52 +0200 |
| commit | 9b1e44c7fb5281688488ec077c048e268b716ad2 (patch) | |
| tree | a91248ffc1279ca3a946dca275b4e434bdd7d273 /test/src | |
| parent | 05215177a61437e864ef771afc99b130866fbcb5 (diff) | |
| download | emacs-9b1e44c7fb5281688488ec077c048e268b716ad2.tar.gz emacs-9b1e44c7fb5281688488ec077c048e268b716ad2.zip | |
Fix value< string comparison ungoodthink
* src/fns.c (string_cmp): Fix bad comparisons for certain strings.
This only affected `value<` for aggregates, not `string<`.
* test/src/fns-tests.el (fns-value<-ordered): Add test cases.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/fns-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index 5ba7e49324a..ca5b10db705 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el | |||
| @@ -1614,6 +1614,12 @@ | |||
| 1614 | ;; strings | 1614 | ;; strings |
| 1615 | ("" . "a") ("a" . "b") ("A" . "a") ("abc" . "abd") | 1615 | ("" . "a") ("a" . "b") ("A" . "a") ("abc" . "abd") |
| 1616 | ("b" . "ba") | 1616 | ("b" . "ba") |
| 1617 | ;; strings again, but in a context where 3-way comparison | ||
| 1618 | ;; matters | ||
| 1619 | (("" . 2) . ("a" . 1)) | ||
| 1620 | (("å" . 2) . ("åü" . 1)) | ||
| 1621 | (("a" . 2) . ("aå" . 1)) | ||
| 1622 | (("\x80" . 2) . ("\x80å" . 1)) | ||
| 1617 | 1623 | ||
| 1618 | ;; lists | 1624 | ;; lists |
| 1619 | ((1 2 3) . (2 3 4)) ((2) . (2 1)) (() . (0)) | 1625 | ((1 2 3) . (2 3 4)) ((2) . (2 1)) (() . (0)) |