diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-20 09:38:31 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-20 09:38:31 +0200 |
commit | 1fb8a1569dab5a5cb99afad9678b3bebae1733c5 (patch) | |
tree | a56c187cca8b24a368af512607dd7fbbd04adb58 /test/src/casefiddle-tests.el | |
parent | 442101433c6459202e325264e3bbf97790f512e6 (diff) | |
download | emacs-1fb8a1569dab5a5cb99afad9678b3bebae1733c5.tar.gz emacs-1fb8a1569dab5a5cb99afad9678b3bebae1733c5.tar.bz2 emacs-1fb8a1569dab5a5cb99afad9678b3bebae1733c5.zip |
Further fixes for Turkish case changes in unibyte strings
* src/casefiddle.c (struct casing_context): Add new slot to keep
track of what the previous operation was.
(case_character_impl): Set it.
(do_casify_unibyte_string): Use it to handle Turkish correctly.
Diffstat (limited to 'test/src/casefiddle-tests.el')
-rw-r--r-- | test/src/casefiddle-tests.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/src/casefiddle-tests.el b/test/src/casefiddle-tests.el index 9fa54dcaf43..164adbc19ef 100644 --- a/test/src/casefiddle-tests.el +++ b/test/src/casefiddle-tests.el @@ -278,4 +278,17 @@ (with-temp-buffer (should-error (upcase-region nil nil t))))) +(ert-deftest casefiddle-turkish () + (skip-unless (member "tr_TR.utf8" (get-locale-names))) + (with-locale-environment "tr_TR.utf8" + (should (string-equal (downcase "I ı") "ı ı")) + (should (string-equal (downcase "İ i") "i̇ i")) + (should (string-equal (downcase "I") "i")) + (should (string-equal (capitalize "bIte") "Bite")) + (should (string-equal (capitalize "bIté") "Bıté")) + (should (string-equal (capitalize "indIa") "India")) + ;; This does not work -- it produces "Indıa". + ;;(should (string-equal (capitalize "indIá") "İndıa")) + )) + ;;; casefiddle-tests.el ends here |