diff options
| author | Lars Ingebrigtsen | 2021-10-20 09:38:31 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-10-20 09:38:31 +0200 |
| commit | 1fb8a1569dab5a5cb99afad9678b3bebae1733c5 (patch) | |
| tree | a56c187cca8b24a368af512607dd7fbbd04adb58 /test/src | |
| parent | 442101433c6459202e325264e3bbf97790f512e6 (diff) | |
| download | emacs-1fb8a1569dab5a5cb99afad9678b3bebae1733c5.tar.gz 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')
| -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 @@ | |||
| 278 | (with-temp-buffer | 278 | (with-temp-buffer |
| 279 | (should-error (upcase-region nil nil t))))) | 279 | (should-error (upcase-region nil nil t))))) |
| 280 | 280 | ||
| 281 | (ert-deftest casefiddle-turkish () | ||
| 282 | (skip-unless (member "tr_TR.utf8" (get-locale-names))) | ||
| 283 | (with-locale-environment "tr_TR.utf8" | ||
| 284 | (should (string-equal (downcase "I ı") "ı ı")) | ||
| 285 | (should (string-equal (downcase "İ i") "i̇ i")) | ||
| 286 | (should (string-equal (downcase "I") "i")) | ||
| 287 | (should (string-equal (capitalize "bIte") "Bite")) | ||
| 288 | (should (string-equal (capitalize "bIté") "Bıté")) | ||
| 289 | (should (string-equal (capitalize "indIa") "India")) | ||
| 290 | ;; This does not work -- it produces "Indıa". | ||
| 291 | ;;(should (string-equal (capitalize "indIá") "İndıa")) | ||
| 292 | )) | ||
| 293 | |||
| 281 | ;;; casefiddle-tests.el ends here | 294 | ;;; casefiddle-tests.el ends here |