From a1ffee1e82b7152772da86a3adc7513128ffefdf Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 17 Jan 2022 16:24:17 +0100 Subject: Add textsec-restriction-level function * lisp/international/textsec.el (textsec-restriction-level): New function. --- test/lisp/international/textsec-tests.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/lisp') diff --git a/test/lisp/international/textsec-tests.el b/test/lisp/international/textsec-tests.el index c80b2ba0fdf..7c56229e983 100644 --- a/test/lisp/international/textsec-tests.el +++ b/test/lisp/international/textsec-tests.el @@ -69,4 +69,16 @@ (should (equal (textsec-covering-scripts "〆切") '(han)))) +(ert-deftest test-restriction-level () + (should (eq (textsec-restriction-level "foo") + 'ascii-only)) + (should (eq (textsec-restriction-level "C𝗂𝗋𝖼𝗅𝖾") + 'single-script)) + (should (eq (textsec-restriction-level "切foo") + 'highly-restrictive)) + (should (eq (textsec-restriction-level "հfoo") + 'moderately-retrictive)) + (should (eq (textsec-restriction-level "Сirсlе") + 'unrestricted))) + ;;; textsec-tests.el ends here -- cgit v1.2.3