diff options
Diffstat (limited to 'test/lisp/subr-tests.el')
-rw-r--r-- | test/lisp/subr-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 3c5dbcdbd76..a3b08e96971 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -271,5 +271,15 @@ indirectly `mapbacktrace'." (let ((frame-lists (subr-test--frames-1 'subr-test--frames-2))) (should (equal (car frame-lists) (cdr frame-lists))))) +(ert-deftest subr-tests--string-match-p--blank () + "Test that [:blank:] matches horizontal whitespace, cf. Bug#25366." + (should (equal (string-match-p "\\`[[:blank:]]\\'" " ") 0)) + (should (equal (string-match-p "\\`[[:blank:]]\\'" "\t") 0)) + (should-not (string-match-p "\\`[[:blank:]]\\'" "\n")) + (should-not (string-match-p "\\`[[:blank:]]\\'" "a")) + (should (equal (string-match-p "\\`[[:blank:]]\\'" "\N{HAIR SPACE}") 0)) + (should (equal (string-match-p "\\`[[:blank:]]\\'" "\u3000") 0)) + (should-not (string-match-p "\\`[[:blank:]]\\'" "\N{LINE SEPARATOR}"))) + (provide 'subr-tests) ;;; subr-tests.el ends here |