add explanation of non-ASCII letters
2 files changed, 96 insertions(+), 7 deletions(-)

M README.md
M tests.el
M README.md +13 -7
@@ 2,13 2,6 @@ 
 
 This package provides functions which change the case of text -- from `camelCase` to `dash-case` to `snake_case` and back.
 
-## Functions ##
-
-There are two sets of functions. If you don't know which you want, prefer the `*-dwim` functions.
-
-1. `*-dwim` functions are the most user-friendly. If the region is active, they act on the region. If given a prefix argument, they act on that many words forward (or, if negative, backward). Otherwise, they change the case of the single next word. These functions are `camelcase-dwim`, `dashcase-dwim`, and `snakecase-dwim`.
-2. `*-word` functions don't act on the region. They take an optional prefix argument, and act on that many words. These functions are `camelcase-word`, `dashcase-word`, and `snakecase-word`.
-
 ## Bindings ##
 
 We recommend binding these functions to relevant keys:

          
@@ 18,3 11,16 @@ We recommend binding these functions to 
 (bind-key "M-S" #'snakecase-dwim)
 (bind-key "M-D" #'dashcase-dwim)
 ```
+
+## Non-ASCII Support ##
+
+Because this package uses standard Emacs [regexp character classes](https://www.gnu.org/software/emacs/manual/html_node/elisp/Char-Classes.html) and [case conversion functions](https://www.gnu.org/software/emacs/manual/html_node/elisp/Case-Conversion.html), it fully supports changing the case of languages that don't use only ASCII letters. Try `orð á íslensku` (Icelandic), or `Deutsch ist ähnlich` (German).
+
+Although languages with no capitalization can't be camelCased, they can still be changed from dash-case to snake_case: try `한국어-단어` `한글-조선글` (Korean).
+
+## Functions ##
+
+There are two sets of functions. If you don't know which you want, prefer the `*-dwim` functions.
+
+1. `*-dwim` functions are the most user-friendly. If the region is active, they act on the region. If given a prefix argument, they act on that many words forward (or, if negative, backward). Otherwise, they change the case of the single next word. These functions are `camelcase-dwim`, `dashcase-dwim`, and `snakecase-dwim`.
+2. `*-word` functions don't act on the region. They take an optional prefix argument, and act on that many words. These functions are `camelcase-word`, `dashcase-word`, and `snakecase-word`.

          
M tests.el +83 -0
@@ 166,6 166,29 @@ was called."
                    "hi_mom and_other |stuff_here"
                    (caser/camelcase-word -1)))))
 
+(ert-deftest camelcase-word/icelandic/from-snakecase ()
+  (should (equal "orðÁÍslensku|"
+                 (caser//on-temp-buffer-point
+                   "|orð_á_íslensku"
+                   (caser/camelcase-word 1)))))
+
+(ert-deftest camelcase-word/icelandic/from-dashcase ()
+  (should (equal "orðÁÍslensku|"
+                 (caser//on-temp-buffer-point
+                   "|orð-á-íslensku"
+                   (caser/camelcase-word 1)))))
+
+(ert-deftest camelcase-word/german/from-snakecase ()
+  (should (equal "deutschIstÄhnlich|"
+                 (caser//on-temp-buffer-point
+                   "|deutsch_ist_ähnlich"
+                   (caser/camelcase-word 1)))))
+
+(ert-deftest camelcase-word/german/from-dashcase ()
+  (should (equal "deutschIstÄhnlich|"
+                 (caser//on-temp-buffer-point
+                   "|deutsch-ist-ähnlich"
+                   (caser/camelcase-word 1)))))
 
 ;;dwim tests
 (ert-deftest camelcase-dwim/single-word-doesnt-change ()

          
@@ 321,6 344,36 @@ was called."
                    "hi-mom and-other |stuff-here"
                    (caser/snakecase-word -1)))))
 
+(ert-deftest snakecase-word/icelandic/from-dashcase ()
+  (should (equal "orð_á_íslensku|"
+                 (caser//on-temp-buffer-point
+                   "|orð-á-íslensku"
+                   (caser/snakecase-word 1)))))
+
+(ert-deftest snakecase-word/icelandic/from-camelcase ()
+  (should (equal "orð_á_íslensku|"
+                 (caser//on-temp-buffer-point
+                   "|orðÁÍslensku"
+                   (caser/snakecase-word 1)))))
+
+(ert-deftest snakecase-word/german/from-dashcase ()
+  (should (equal "deutsch_ist_ähnlich|"
+                 (caser//on-temp-buffer-point
+                   "|deutsch-ist-ähnlich"
+                   (caser/snakecase-word 1)))))
+
+(ert-deftest snakecase-word/german/from-camelcase ()
+  (should (equal "deutsch_ist_ähnlich|"
+                 (caser//on-temp-buffer-point
+                   "|deutschIstÄhnlich"
+                   (caser/snakecase-word 1)))))
+
+(ert-deftest snakecase-word/korean/from-dashcase ()
+  (should (equal "한국어_단어|"
+                 (caser//on-temp-buffer-point
+                   "|한국어-단어"
+                   (caser/snakecase-word 1)))))
+
 ;;dwim tests
 (ert-deftest snakecase-dwim/single-word-doesnt-change ()
   (should (equal "hi"

          
@@ 457,6 510,36 @@ was called."
                    "hi_mom and_other |stuff_here"
                    (caser/dashcase-word -1)))))
 
+(ert-deftest dashcase-word/icelandic/from-snakecase ()
+  (should (equal "orð-á-íslensku|"
+                 (caser//on-temp-buffer-point
+                   "|orð_á_íslensku"
+                   (caser/dashcase-word 1)))))
+
+(ert-deftest dashcase-word/icelandic/from-camelcase ()
+  (should (equal "orð-á-íslensku|"
+                 (caser//on-temp-buffer-point
+                   "|orðÁÍslensku"
+                   (caser/dashcase-word 1)))))
+
+(ert-deftest dashcase-word/german/from-snakecase ()
+  (should (equal "deutsch-ist-ähnlich|"
+                 (caser//on-temp-buffer-point
+                   "|deutsch_ist_ähnlich"
+                   (caser/dashcase-word 1)))))
+
+(ert-deftest dashcase-word/german/from-camelcase ()
+  (should (equal "deutsch-ist-ähnlich|"
+                 (caser//on-temp-buffer-point
+                   "|deutschIstÄhnlich"
+                   (caser/dashcase-word 1)))))
+
+(ert-deftest dashcase-word/korean/from-snakecase ()
+  (should (equal "한국어-단어|"
+                 (caser//on-temp-buffer-point
+                   "|한국어_단어"
+                   (caser/dashcase-word 1)))))
+
 ;; dwim tests
 (ert-deftest dashcase-dwim/single-word-doesnt-change ()
   (should (equal "hi"