diff options
Diffstat (limited to 'test/lisp/progmodes')
| -rw-r--r-- | test/lisp/progmodes/cc-mode-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/compile-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/elisp-mode-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/etags-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/f90.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/flymake-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/js-tests.el | 90 | ||||
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 14 | ||||
| -rw-r--r-- | test/lisp/progmodes/ruby-mode-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/sql-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/subword-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/xref-tests.el | 2 |
12 files changed, 111 insertions, 13 deletions
diff --git a/test/lisp/progmodes/cc-mode-tests.el b/test/lisp/progmodes/cc-mode-tests.el index 62e0a738fbd..10f424f5282 100644 --- a/test/lisp/progmodes/cc-mode-tests.el +++ b/test/lisp/progmodes/cc-mode-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cc-mode-tests.el --- Test suite for cc-mode. -*- lexical-binding: t; -*- | 1 | ;;; cc-mode-tests.el --- Test suite for cc-mode. -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2016-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Michal Nazarewicz <mina86@mina86.com> | 5 | ;; Author: Michal Nazarewicz <mina86@mina86.com> |
| 6 | ;; Keywords: internal | 6 | ;; Keywords: internal |
diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index 9f61c20fd5e..5c8c9c2a81f 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; compile-tests.el --- Test suite for compile.el. -*- lexical-binding: t; -*- | 1 | ;;; compile-tests.el --- Test suite for compile.el. -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2011-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Chong Yidong <cyd@stupidchicken.com> | 5 | ;; Author: Chong Yidong <cyd@stupidchicken.com> |
| 6 | ;; Keywords: internal | 6 | ;; Keywords: internal |
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 12e61cf8d18..93c428b2d2b 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; elisp-mode-tests.el --- Tests for emacs-lisp-mode -*- lexical-binding: t; -*- | 1 | ;;; elisp-mode-tests.el --- Tests for emacs-lisp-mode -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2015-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2015-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dmitry Gutov <dgutov@yandex.ru> | 5 | ;; Author: Dmitry Gutov <dgutov@yandex.ru> |
| 6 | ;; Author: Stephen Leake <stephen_leake@member.fsf.org> | 6 | ;; Author: Stephen Leake <stephen_leake@member.fsf.org> |
diff --git a/test/lisp/progmodes/etags-tests.el b/test/lisp/progmodes/etags-tests.el index a992a17dc46..eec8a02f1b1 100644 --- a/test/lisp/progmodes/etags-tests.el +++ b/test/lisp/progmodes/etags-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; etags-tests.el --- Test suite for etags.el. | 1 | ;;; etags-tests.el --- Test suite for etags.el. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2016-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eli Zaretskii <eliz@gnu.org> | 5 | ;; Author: Eli Zaretskii <eliz@gnu.org> |
| 6 | 6 | ||
diff --git a/test/lisp/progmodes/f90.el b/test/lisp/progmodes/f90.el index 29c608847f1..cda39eda376 100644 --- a/test/lisp/progmodes/f90.el +++ b/test/lisp/progmodes/f90.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; f90.el --- tests for progmodes/f90.el | 1 | ;;; f90.el --- tests for progmodes/f90.el |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2011-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Glenn Morris <rgm@gnu.org> | 5 | ;; Author: Glenn Morris <rgm@gnu.org> |
| 6 | 6 | ||
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el index 386516190bb..9bf6e7aa178 100644 --- a/test/lisp/progmodes/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; flymake-tests.el --- Test suite for flymake | 1 | ;;; flymake-tests.el --- Test suite for flymake |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2011-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eduard Wiebe <usenet@pusto.de> | 5 | ;; Author: Eduard Wiebe <usenet@pusto.de> |
| 6 | 6 | ||
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el new file mode 100644 index 00000000000..84749efa45b --- /dev/null +++ b/test/lisp/progmodes/js-tests.el | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | ;;; js-tests.el --- Test suite for js-mode | ||
| 2 | |||
| 3 | ;; Copyright (C) 2017 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | |||
| 22 | ;;; Code: | ||
| 23 | |||
| 24 | (require 'ert) | ||
| 25 | (require 'js) | ||
| 26 | |||
| 27 | (ert-deftest js-mode-fill-bug-19399 () | ||
| 28 | (with-temp-buffer | ||
| 29 | (insert "/") | ||
| 30 | (save-excursion (insert "/ comment")) | ||
| 31 | (js-mode) | ||
| 32 | (fill-paragraph) | ||
| 33 | (should (equal (buffer-substring (point-min) (point-max)) | ||
| 34 | "// comment")))) | ||
| 35 | |||
| 36 | (ert-deftest js-mode-fill-bug-22431 () | ||
| 37 | (with-temp-buffer | ||
| 38 | (insert "/**\n") | ||
| 39 | (insert " * Load the inspector's shared head.js for use by tests that ") | ||
| 40 | (insert "need to open the something or other") | ||
| 41 | (js-mode) | ||
| 42 | ;; This fails with auto-fill but not fill-paragraph. | ||
| 43 | (do-auto-fill) | ||
| 44 | (should (equal (buffer-substring (point-min) (point-max)) | ||
| 45 | "/** | ||
| 46 | * Load the inspector's shared head.js for use by tests that need to | ||
| 47 | * open the something or other")))) | ||
| 48 | |||
| 49 | (ert-deftest js-mode-fill-bug-22431-fill-paragraph-at-start () | ||
| 50 | (with-temp-buffer | ||
| 51 | (insert "/**\n") | ||
| 52 | (insert " * Load the inspector's shared head.js for use by tests that ") | ||
| 53 | (insert "need to open the something or other") | ||
| 54 | (js-mode) | ||
| 55 | (goto-char (point-min)) | ||
| 56 | (fill-paragraph) | ||
| 57 | (should (equal (buffer-substring (point-min) (point-max)) | ||
| 58 | "/** | ||
| 59 | * Load the inspector's shared head.js for use by tests that need to | ||
| 60 | * open the something or other")))) | ||
| 61 | |||
| 62 | (ert-deftest js-mode-regexp-syntax () | ||
| 63 | (with-temp-buffer | ||
| 64 | ;; Normally indentation tests are done in manual/indent, but in | ||
| 65 | ;; this case we are specifically testing a case where the bug | ||
| 66 | ;; caused the indenter not to do anything, and manual/indent can | ||
| 67 | ;; only be used for already-correct files. | ||
| 68 | (insert "function f(start, value) { | ||
| 69 | if (start - 1 === 0 || /[ (:,='\"]/.test(value)) { | ||
| 70 | --start; | ||
| 71 | } | ||
| 72 | if (start - 1 === 0 && /[ (:,='\"]/.test(value)) { | ||
| 73 | --start; | ||
| 74 | } | ||
| 75 | if (!/[ (:,='\"]/.test(value)) { | ||
| 76 | --start; | ||
| 77 | } | ||
| 78 | } | ||
| 79 | ") | ||
| 80 | (js-mode) | ||
| 81 | (indent-region (point-min) (point-max)) | ||
| 82 | (goto-char (point-min)) | ||
| 83 | (dolist (x '(0 4 8 4 4 8 4 4 8 4 0)) | ||
| 84 | (back-to-indentation) | ||
| 85 | (should (= (current-column) x)) | ||
| 86 | (forward-line)))) | ||
| 87 | |||
| 88 | (provide 'js-tests) | ||
| 89 | |||
| 90 | ;;; js-tests.el ends here | ||
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index f6564dd58cc..2df1bbf50d8 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; python-tests.el --- Test suite for python.el | 1 | ;;; python-tests.el --- Test suite for python.el |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2013-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2013-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -3559,6 +3559,9 @@ class Baz(object): | |||
| 3559 | 3559 | ||
| 3560 | def c(self): | 3560 | def c(self): |
| 3561 | pass | 3561 | pass |
| 3562 | |||
| 3563 | async def d(self): | ||
| 3564 | pass | ||
| 3562 | " | 3565 | " |
| 3563 | (goto-char (point-max)) | 3566 | (goto-char (point-max)) |
| 3564 | (should (equal | 3567 | (should (equal |
| @@ -3580,7 +3583,8 @@ class Baz(object): | |||
| 3580 | (list | 3583 | (list |
| 3581 | "Frob (class)" | 3584 | "Frob (class)" |
| 3582 | (cons "*class definition*" (copy-marker 601)) | 3585 | (cons "*class definition*" (copy-marker 601)) |
| 3583 | (cons "c (def)" (copy-marker 626))))) | 3586 | (cons "c (def)" (copy-marker 626)) |
| 3587 | (cons "d (async def)" (copy-marker 665))))) | ||
| 3584 | (python-imenu-create-index))))) | 3588 | (python-imenu-create-index))))) |
| 3585 | 3589 | ||
| 3586 | (ert-deftest python-imenu-create-index-2 () | 3590 | (ert-deftest python-imenu-create-index-2 () |
| @@ -3702,6 +3706,9 @@ class Baz(object): | |||
| 3702 | 3706 | ||
| 3703 | def c(self): | 3707 | def c(self): |
| 3704 | pass | 3708 | pass |
| 3709 | |||
| 3710 | async def d(self): | ||
| 3711 | pass | ||
| 3705 | " | 3712 | " |
| 3706 | (goto-char (point-max)) | 3713 | (goto-char (point-max)) |
| 3707 | (should (equal | 3714 | (should (equal |
| @@ -3714,7 +3721,8 @@ class Baz(object): | |||
| 3714 | (cons "Baz.a" (copy-marker 539)) | 3721 | (cons "Baz.a" (copy-marker 539)) |
| 3715 | (cons "Baz.b" (copy-marker 570)) | 3722 | (cons "Baz.b" (copy-marker 570)) |
| 3716 | (cons "Baz.Frob" (copy-marker 601)) | 3723 | (cons "Baz.Frob" (copy-marker 601)) |
| 3717 | (cons "Baz.Frob.c" (copy-marker 626))) | 3724 | (cons "Baz.Frob.c" (copy-marker 626)) |
| 3725 | (cons "Baz.Frob.d" (copy-marker 665))) | ||
| 3718 | (python-imenu-create-flat-index))))) | 3726 | (python-imenu-create-flat-index))))) |
| 3719 | 3727 | ||
| 3720 | (ert-deftest python-imenu-create-flat-index-2 () | 3728 | (ert-deftest python-imenu-create-flat-index-2 () |
diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index 97f277bff41..f04483f6d7c 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; ruby-mode-tests.el --- Test suite for ruby-mode | 1 | ;;; ruby-mode-tests.el --- Test suite for ruby-mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2012-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2012-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/test/lisp/progmodes/sql-tests.el b/test/lisp/progmodes/sql-tests.el index e05247a60ed..27a72aa2c23 100644 --- a/test/lisp/progmodes/sql-tests.el +++ b/test/lisp/progmodes/sql-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; sql-tests.el --- Tests for sql.el -*- lexical-binding: t; -*- | 1 | ;;; sql-tests.el --- Tests for sql.el -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2016-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Simen Heggestøyl <simenheg@gmail.com> | 5 | ;; Author: Simen Heggestøyl <simenheg@gmail.com> |
| 6 | ;; Keywords: | 6 | ;; Keywords: |
diff --git a/test/lisp/progmodes/subword-tests.el b/test/lisp/progmodes/subword-tests.el index 5a562765bb1..39512efdbe1 100644 --- a/test/lisp/progmodes/subword-tests.el +++ b/test/lisp/progmodes/subword-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; subword-tests.el --- Testing the subword rules | 1 | ;;; subword-tests.el --- Testing the subword rules |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2011-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> | 5 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
| 6 | ;; Keywords: | 6 | ;; Keywords: |
diff --git a/test/lisp/progmodes/xref-tests.el b/test/lisp/progmodes/xref-tests.el index 2b745816c62..b7f0f0526c6 100644 --- a/test/lisp/progmodes/xref-tests.el +++ b/test/lisp/progmodes/xref-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; xref-tests.el --- tests for xref | 1 | ;;; xref-tests.el --- tests for xref |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2016-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Dmitry Gutov <dgutov@yandex.ru> | 5 | ;; Author: Dmitry Gutov <dgutov@yandex.ru> |
| 6 | 6 | ||