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

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

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