diff options
| author | Michal Nazarewicz | 2016-09-19 00:52:47 +0200 |
|---|---|---|
| committer | Michal Nazarewicz | 2017-04-06 20:54:58 +0200 |
| commit | c1fa07222e9c76964d1261c31b50f1e399554fa2 (patch) | |
| tree | d1d48a5fd44b2d2abd049a70d17984a76c022c4f /test/src | |
| parent | b3b9b258c4026baa1cad3f2e617f1a637fc8d205 (diff) | |
| download | emacs-c1fa07222e9c76964d1261c31b50f1e399554fa2.tar.gz emacs-c1fa07222e9c76964d1261c31b50f1e399554fa2.zip | |
Implement special sigma casing rule (bug#24603)
In Greek, a sigma character has two lower case forms which depend on
their position in the word. Implement logic determining it.
* src/casefiddle.c (struct casing_context, case_character_impl): Don’t
assume inword is true when flag is CASE_UP and false when flag is
CASE_DOWN. For final sigma detection we need this information tracked
reliably;.
(CAPITAL_SIGMA, SMALL_SIGMA, SMALL_FINAL_SIGMA): New macros defining
Unicode code point of different forms of sigma letter.
(case_character): Implement support for final sigma casing.
(do_casify_multibyte_string, do_casify_multibyte_region): Update after
changes to case_character.
* test/src/casefiddle-tests.el (casefiddle-tests-casing): Add test
cases for final sigma.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/casefiddle-tests.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/src/casefiddle-tests.el b/test/src/casefiddle-tests.el index dd260633f4c..234d233c71a 100644 --- a/test/src/casefiddle-tests.el +++ b/test/src/casefiddle-tests.el | |||
| @@ -195,13 +195,16 @@ | |||
| 195 | ("define" "DEFINE" "define" "Define" "Define") | 195 | ("define" "DEFINE" "define" "Define" "Define") |
| 196 | ("fish" "FISH" "fish" "Fish" "Fish") | 196 | ("fish" "FISH" "fish" "Fish" "Fish") |
| 197 | ("Straße" "STRASSE" "straße" "Straße" "Straße") | 197 | ("Straße" "STRASSE" "straße" "Straße" "Straße") |
| 198 | ;; FIXME(bug#24603): Everything below is broken at the moment. | ||
| 199 | ;; Here’s what should happen: | ||
| 200 | ;;("ΌΣΟΣ" "ΌΣΟΣ" "όσος" "Όσος" "Όσος") | ||
| 201 | ;; And here’s what is actually happening: | ||
| 202 | ("ΌΣΟΣ" "ΌΣΟΣ" "όσοσ" "Όσοσ" "ΌΣΟΣ") | ||
| 203 | 198 | ||
| 204 | ("όσος" "ΌΣΟΣ" "όσος" "Όσος" "Όσος")))))) | 199 | ;; The word repeated twice to test behaviour at the end of a word |
| 200 | ;; inside of an input string as well as at the end of the string. | ||
| 201 | ("ΌΣΟΣ ΌΣΟΣ" "ΌΣΟΣ ΌΣΟΣ" "όσος όσος" "Όσος Όσος" "ΌΣΟΣ ΌΣΟΣ") | ||
| 202 | ;; What should be done with sole sigma? It is ‘final’ but on the | ||
| 203 | ;; other hand it does not form a word. We’re using regular sigma. | ||
| 204 | ("Σ Σ" "Σ Σ" "σ σ" "Σ Σ" "Σ Σ") | ||
| 205 | ("όσος" "ΌΣΟΣ" "όσος" "Όσος" "Όσος") | ||
| 206 | ;; If sigma is already lower case, we don’t want to change it. | ||
| 207 | ("όσοσ" "ΌΣΟΣ" "όσοσ" "Όσοσ" "Όσοσ")))))) | ||
| 205 | 208 | ||
| 206 | (ert-deftest casefiddle-tests-casing-byte8 () | 209 | (ert-deftest casefiddle-tests-casing-byte8 () |
| 207 | (should-not | 210 | (should-not |