Commit 4bdc0374 authored by João Távora's avatar João Távora

Revert "Temporarily comment out CC Mode from tests..."

This reverts commit 54f29790.
parent e5663bea
......@@ -157,8 +157,7 @@ The buffer's contents should %s:
expected-string
expected-point
bindings
(modes '(quote (ruby-mode ;; c++-mode
)))
(modes '(quote (ruby-mode c++-mode)))
(test-in-comments t)
(test-in-strings t)
(test-in-code t)
......@@ -397,10 +396,10 @@ baz\"\""
;; mode will sort this out eventually, using some new e-p-m machinery.
;; See
;; https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00535.html
;; (setf
;; (ert-test-expected-result-type
;; (ert-get-test 'electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings))
;; :failed)
(setf
(ert-test-expected-result-type
(ert-get-test 'electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings))
:failed)
(define-electric-pair-test whitespace-chomping-dont-cross-comments
" ( \n\t\t\n ) " "--)------" :expected-string " () \n\t\t\n ) "
......@@ -816,34 +815,31 @@ baz\"\""
;;; tests for `electric-layout-mode'
;; Tests commented out, since C Mode does not use
;; electric-layout-mode. 2019-01-17, ACM
;; (ert-deftest electric-layout-int-main-kernel-style ()
;; (ert-with-test-buffer ()
;; (c-mode)
;; (electric-layout-local-mode 1)
;; (electric-pair-local-mode 1)
;; (electric-indent-local-mode 1)
;; (setq-local electric-layout-rules
;; '((?\{ . (after-stay after))))
;; (insert "int main () ")
;; (let ((last-command-event ?\{))
;; (call-interactively (key-binding `[,last-command-event])))
;; (should (equal (buffer-string) "int main () {\n \n}"))))
;; (ert-deftest electric-layout-int-main-allman-style ()
;; (ert-with-test-buffer ()
;; (c-mode)
;; (electric-layout-local-mode 1)
;; (electric-pair-local-mode 1)
;; (electric-indent-local-mode 1)
;; (setq-local electric-layout-rules
;; '((?\{ . (before after-stay after))))
;; (insert "int main () ")
;; (let ((last-command-event ?\{))
;; (call-interactively (key-binding `[,last-command-event])))
;; (should (equal (buffer-string) "int main ()\n{\n \n}"))))
(ert-deftest electric-layout-int-main-kernel-style ()
(ert-with-test-buffer ()
(c-mode)
(electric-layout-local-mode 1)
(electric-pair-local-mode 1)
(electric-indent-local-mode 1)
(setq-local electric-layout-rules
'((?\{ . (after-stay after))))
(insert "int main () ")
(let ((last-command-event ?\{))
(call-interactively (key-binding `[,last-command-event])))
(should (equal (buffer-string) "int main () {\n \n}"))))
(ert-deftest electric-layout-int-main-allman-style ()
(ert-with-test-buffer ()
(c-mode)
(electric-layout-local-mode 1)
(electric-pair-local-mode 1)
(electric-indent-local-mode 1)
(setq-local electric-layout-rules
'((?\{ . (before after-stay after))))
(insert "int main () ")
(let ((last-command-event ?\{))
(call-interactively (key-binding `[,last-command-event])))
(should (equal (buffer-string) "int main ()\n{\n \n}"))))
(define-derived-mode plainer-c-mode c-mode "pC"
"A plainer/saner C-mode with no internal electric machinery."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment