diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/lisp-mode-tests.el | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index e4ba929ecbd..c0dd68c0a0b 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el | |||
| @@ -20,6 +20,10 @@ | |||
| 20 | (require 'ert) | 20 | (require 'ert) |
| 21 | (require 'cl-lib) | 21 | (require 'cl-lib) |
| 22 | (require 'lisp-mode) | 22 | (require 'lisp-mode) |
| 23 | (require 'faceup) | ||
| 24 | |||
| 25 | |||
| 26 | ;;; Indentation | ||
| 23 | 27 | ||
| 24 | (defconst lisp-mode-tests--correctly-indented-sexp "\ | 28 | (defconst lisp-mode-tests--correctly-indented-sexp "\ |
| 25 | \(a | 29 | \(a |
| @@ -290,5 +294,27 @@ Expected initialization file: `%s'\" | |||
| 290 | (insert "\"\n") | 294 | (insert "\"\n") |
| 291 | (lisp-indent-region (point-min) (point-max)))) | 295 | (lisp-indent-region (point-min) (point-max)))) |
| 292 | 296 | ||
| 297 | |||
| 298 | ;;; Fontification | ||
| 299 | |||
| 300 | (ert-deftest lisp-fontify-confusables () | ||
| 301 | "Unescaped 'smart quotes' should be fontified in `font-lock-warning-face'." | ||
| 302 | (with-temp-buffer | ||
| 303 | (dolist (ch | ||
| 304 | '(#x2018 ;; LEFT SINGLE QUOTATION MARK | ||
| 305 | #x2019 ;; RIGHT SINGLE QUOTATION MARK | ||
| 306 | #x201B ;; SINGLE HIGH-REVERSED-9 QUOTATION MARK | ||
| 307 | #x201C ;; LEFT DOUBLE QUOTATION MARK | ||
| 308 | #x201D ;; RIGHT DOUBLE QUOTATION MARK | ||
| 309 | #x201F ;; DOUBLE HIGH-REVERSED-9 QUOTATION MARK | ||
| 310 | #x301E ;; DOUBLE PRIME QUOTATION MARK | ||
| 311 | #xFF02 ;; FULLWIDTH QUOTATION MARK | ||
| 312 | #xFF07 ;; FULLWIDTH APOSTROPHE | ||
| 313 | )) | ||
| 314 | (insert (format "«w:%c»foo \\%cfoo\n" ch ch))) | ||
| 315 | (let ((faceup (buffer-string))) | ||
| 316 | (faceup-clean-buffer) | ||
| 317 | (should (faceup-test-font-lock-buffer 'emacs-lisp-mode faceup))))) | ||
| 318 | |||
| 293 | (provide 'lisp-mode-tests) | 319 | (provide 'lisp-mode-tests) |
| 294 | ;;; lisp-mode-tests.el ends here | 320 | ;;; lisp-mode-tests.el ends here |