diff options
author | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
commit | ec0a80cc283badc7f7fd5ef78512dde6d34b1355 (patch) | |
tree | 7190e0fb3d4aa06018d8cf997f06b806fb09a9c8 /test | |
parent | d259328fb87db8cc67d52771efcfa653e52c5b71 (diff) | |
parent | e823c34072bf045800d91e12c7ddb61fa23c6e30 (diff) | |
download | emacs-25-merge.tar.gz |
Merge emacs-25 into master (using imerge)emacs-25-merge
Diffstat (limited to 'test')
33 files changed, 1860 insertions, 569 deletions
diff --git a/test/automated/data/package/macro-problem-package-1.0/macro-aux.el b/test/automated/data/package/macro-problem-package-1.0/macro-aux.el new file mode 100644 index 00000000000..f43232224af --- /dev/null +++ b/test/automated/data/package/macro-problem-package-1.0/macro-aux.el @@ -0,0 +1,12 @@ +;;; macro-aux.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba <emacs@endlessparentheses.com> + +;;; Code: + +(defun macro-aux-1 ( &rest forms) + "Description" + `(progn ,@forms)) + +(provide 'macro-aux) +;;; macro-aux.el ends here diff --git a/test/automated/data/package/macro-problem-package-1.0/macro-problem.el b/test/automated/data/package/macro-problem-package-1.0/macro-problem.el new file mode 100644 index 00000000000..0533b1bd9c4 --- /dev/null +++ b/test/automated/data/package/macro-problem-package-1.0/macro-problem.el @@ -0,0 +1,21 @@ +;;; macro-problem.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba <emacs@endlessparentheses.com> +;; Keywords: tools +;; Version: 1.0 + +;;; Code: + +(require 'macro-aux) + +(defmacro macro-problem-1 ( &rest forms) + "Description" + `(progn ,@forms)) + +(defun macro-problem-func () + "" + (macro-problem-1 'a 'b) + (macro-aux-1 'a 'b)) + +(provide 'macro-problem) +;;; macro-problem.el ends here diff --git a/test/automated/data/package/macro-problem-package-2.0/macro-aux.el b/test/automated/data/package/macro-problem-package-2.0/macro-aux.el new file mode 100644 index 00000000000..6a55a40e3b4 --- /dev/null +++ b/test/automated/data/package/macro-problem-package-2.0/macro-aux.el @@ -0,0 +1,16 @@ +;;; macro-aux.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba <emacs@endlessparentheses.com> + +;;; Code: + +(defmacro macro-aux-1 ( &rest forms) + "Description" + `(progn ,@forms)) + +(defmacro macro-aux-3 ( &rest _) + "Description" + 90) + +(provide 'macro-aux) +;;; macro-aux.el ends here diff --git a/test/automated/data/package/macro-problem-package-2.0/macro-problem.el b/test/automated/data/package/macro-problem-package-2.0/macro-problem.el new file mode 100644 index 00000000000..cad4ed93f19 --- /dev/null +++ b/test/automated/data/package/macro-problem-package-2.0/macro-problem.el @@ -0,0 +1,30 @@ +;;; macro-problem.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba <emacs@endlessparentheses.com> +;; Keywords: tools +;; Version: 2.0 + +;;; Code: + +(require 'macro-aux) + +(defmacro macro-problem-1 ( &rest forms) + "Description" + `(progn ,(cadr (car forms)))) + + +(defun macro-problem-func () + "" + (list (macro-problem-1 '1 'b) + (macro-aux-1 'a 'b))) + +(defmacro macro-problem-3 (&rest _) + "Description" + 10) + +(defun macro-problem-10-and-90 () + "" + (list (macro-problem-3 haha) (macro-aux-3 hehe))) + +(provide 'macro-problem) +;;; macro-problem.el ends here diff --git a/test/lisp/url/url-expand-tests.el b/test/automated/url-expand-tests.el index 2bd28687f8d..2bd28687f8d 100644 --- a/test/lisp/url/url-expand-tests.el +++ b/test/automated/url-expand-tests.el diff --git a/test/automated/url-parse-tests.el b/test/automated/url-parse-tests.el new file mode 100644 index 00000000000..443034a603e --- /dev/null +++ b/test/automated/url-parse-tests.el @@ -0,0 +1,167 @@ +;;; url-parse-tests.el --- Test suite for URI/URL parsing. + +;; Copyright (C) 2012-2015 Free Software Foundation, Inc. + +;; Author: Alain Schneble <a.s@realize.ch> +;; Version: 1.0 + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Test cases covering generic URI syntax as described in RFC3986, +;; section 3. Syntax Components and 4. Usage. See also appendix +;; A. Collected ABNF for URI, as the example given here are all +;; productions of this grammar. + +;; Each tests parses a given URI string - whether relative or absolute - +;; using `url-generic-parse-url' and compares the constructed +;; URL-struct (Actual) against a manually `url-parse-make-urlobj'- +;; constructed URL-struct (Expected). + +;;; Code: + +(require 'url-parse) +(require 'ert) + +(ert-deftest url-generic-parse-url/generic-uri-examples () + "RFC 3986, section 1.1.2. Examples / Example illustrating several URI schemes and variations in their common syntax components" + (should (equal (url-generic-parse-url "ftp://ftp.is.co.za/rfc/rfc1808.txt") (url-parse-make-urlobj "ftp" nil nil "ftp.is.co.za" nil "/rfc/rfc1808.txt" nil nil t))) + (should (equal (url-generic-parse-url "http://www.ietf.org/rfc/rfc2396.txt") (url-parse-make-urlobj "http" nil nil "www.ietf.org" nil "/rfc/rfc2396.txt" nil nil t))) + (should (equal (url-generic-parse-url "ldap://[2001:db8::7]/c=GB?objectClass?one") (url-parse-make-urlobj "ldap" nil nil "[2001:db8::7]" nil "/c=GB?objectClass?one" nil nil t))) + (should (equal (url-generic-parse-url "mailto:John.Doe@example.com") (url-parse-make-urlobj "mailto" nil nil nil nil "John.Doe@example.com" nil nil nil))) + (should (equal (url-generic-parse-url "news:comp.infosystems.www.servers.unix") (url-parse-make-urlobj "news" nil nil nil nil "comp.infosystems.www.servers.unix" nil nil nil))) + (should (equal (url-generic-parse-url "tel:+1-816-555-1212") (url-parse-make-urlobj "tel" nil nil nil nil "+1-816-555-1212" nil nil nil))) + (should (equal (url-generic-parse-url "telnet://192.0.2.16:80/") (url-parse-make-urlobj "telnet" nil nil "192.0.2.16" 80 "/" nil nil t))) + (should (equal (url-generic-parse-url "urn:oasis:names:specification:docbook:dtd:xml:4.1.2") (url-parse-make-urlobj "urn" nil nil nil nil "oasis:names:specification:docbook:dtd:xml:4.1.2" nil nil nil)))) + +(ert-deftest url-generic-parse-url/generic-uri () + "RFC 3986, section 3. Syntax Components / generic URI syntax" + ;; empty path + (should (equal (url-generic-parse-url "http://host#") (url-parse-make-urlobj "http" nil nil "host" nil "" "" nil t))) + (should (equal (url-generic-parse-url "http://host#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host?#") (url-parse-make-urlobj "http" nil nil "host" nil "?" "" nil t))) + (should (equal (url-generic-parse-url "http://host?query#") (url-parse-make-urlobj "http" nil nil "host" nil "?query" "" nil t))) + (should (equal (url-generic-parse-url "http://host?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "?" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "?query" "fragment" nil t))) + ;; absolute path / + (should (equal (url-generic-parse-url "http://host/#") (url-parse-make-urlobj "http" nil nil "host" nil "/" "" nil t))) + (should (equal (url-generic-parse-url "http://host/#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/?#") (url-parse-make-urlobj "http" nil nil "host" nil "/?" "" nil t))) + (should (equal (url-generic-parse-url "http://host/?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/?query" "" nil t))) + (should (equal (url-generic-parse-url "http://host/?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/?" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/?query" "fragment" nil t))) + ;; absolute path /foo + (should (equal (url-generic-parse-url "http://host/foo#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" "fragment" nil t))) + ;; absolute path /foo/ + (should (equal (url-generic-parse-url "http://host/foo/#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" "fragment" nil t))) + ;; absolute path /foo/bar + (should (equal (url-generic-parse-url "http://host/foo/bar#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" "fragment" nil t))) + ;; absolute path /foo/bar/ + (should (equal (url-generic-parse-url "http://host/foo/bar/#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar/#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar/?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar/?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" "" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar/?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" "fragment" nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar/?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" "fragment" nil t))) + ;; for more examples of URIs without fragments, see tests covering section 4.3. Absolute URI + ) + +(ert-deftest url-generic-parse-url/network-path-reference () + "RFC 3986, section 4.2. Relative Reference / network-path reference: a relative reference that begins with two slash characters" + (should (equal (url-generic-parse-url "//host") (url-parse-make-urlobj nil nil nil "host" nil "" nil nil t))) + (should (equal (url-generic-parse-url "//host/") (url-parse-make-urlobj nil nil nil "host" nil "/" nil nil t))) + (should (equal (url-generic-parse-url "//host/foo") (url-parse-make-urlobj nil nil nil "host" nil "/foo" nil nil t))) + (should (equal (url-generic-parse-url "//host/foo/bar") (url-parse-make-urlobj nil nil nil "host" nil "/foo/bar" nil nil t))) + (should (equal (url-generic-parse-url "//host/foo/bar/") (url-parse-make-urlobj nil nil nil "host" nil "/foo/bar/" nil nil t)))) + +(ert-deftest url-generic-parse-url/absolute-path-reference () + "RFC 3986, section 4.2. Relative Reference / absolute-path reference: a relative reference that begins with a single slash character" + (should (equal (url-generic-parse-url "/") (url-parse-make-urlobj nil nil nil nil nil "/" nil nil nil))) + (should (equal (url-generic-parse-url "/foo") (url-parse-make-urlobj nil nil nil nil nil "/foo" nil nil nil))) + (should (equal (url-generic-parse-url "/foo/bar") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar" nil nil nil))) + (should (equal (url-generic-parse-url "/foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar/" nil nil nil))) + (should (equal (url-generic-parse-url "/foo/bar#") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar" "" nil nil))) + (should (equal (url-generic-parse-url "/foo/bar/#") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar/" "" nil nil)))) + +(ert-deftest url-generic-parse-url/relative-path-reference () + "RFC 3986, section 4.2. Relative Reference / relative-path reference: a relative reference that does not begin with a slash character" + (should (equal (url-generic-parse-url "foo") (url-parse-make-urlobj nil nil nil nil nil "foo" nil nil nil))) + (should (equal (url-generic-parse-url "foo/bar") (url-parse-make-urlobj nil nil nil nil nil "foo/bar" nil nil nil))) + (should (equal (url-generic-parse-url "foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "foo/bar/" nil nil nil))) + (should (equal (url-generic-parse-url "./foo") (url-parse-make-urlobj nil nil nil nil nil "./foo" nil nil nil))) + (should (equal (url-generic-parse-url "./foo/bar") (url-parse-make-urlobj nil nil nil nil nil "./foo/bar" nil nil nil))) + (should (equal (url-generic-parse-url "./foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "./foo/bar/" nil nil nil))) + (should (equal (url-generic-parse-url "../foo") (url-parse-make-urlobj nil nil nil nil nil "../foo" nil nil nil))) + (should (equal (url-generic-parse-url "../foo/bar") (url-parse-make-urlobj nil nil nil nil nil "../foo/bar" nil nil nil))) + (should (equal (url-generic-parse-url "../foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "../foo/bar/" nil nil nil))) + (should (equal (url-generic-parse-url "./this:that") (url-parse-make-urlobj nil nil nil nil nil "./this:that" nil nil nil))) + ;; for more examples of relative-path references, see tests covering section 4.4. Same-Document Reference + ) + +(ert-deftest url-generic-parse-url/absolute-uri () + "RFC 3986, section 4.3. Absolute URI / absolute URI: absolute form of a URI without a fragment identifier" + ;; empty path + (should (equal (url-generic-parse-url "http://host") (url-parse-make-urlobj "http" nil nil "host" nil "" nil nil t))) + (should (equal (url-generic-parse-url "http://host?") (url-parse-make-urlobj "http" nil nil "host" nil "?" nil nil t))) + (should (equal (url-generic-parse-url "http://host?query") (url-parse-make-urlobj "http" nil nil "host" nil "?query" nil nil t))) + ;; absolute path / + (should (equal (url-generic-parse-url "http://host/") (url-parse-make-urlobj "http" nil nil "host" nil "/" nil nil t))) + (should (equal (url-generic-parse-url "http://host/?") (url-parse-make-urlobj "http" nil nil "host" nil "/?" nil nil t))) + (should (equal (url-generic-parse-url "http://host/?query") (url-parse-make-urlobj "http" nil nil "host" nil "/?query" nil nil t))) + ;; absolute path /foo + (should (equal (url-generic-parse-url "http://host/foo") (url-parse-make-urlobj "http" nil nil "host" nil "/foo" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" nil nil t))) + ;; absolute path /foo/ + (should (equal (url-generic-parse-url "http://host/foo/") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo/?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo/?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" nil nil t))) + ;; absolute path /foo/bar + (should (equal (url-generic-parse-url "http://host/foo/bar") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" nil nil t))) + ;; absolute path /foo/bar/ + (should (equal (url-generic-parse-url "http://host/foo/bar/") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar/?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" nil nil t))) + (should (equal (url-generic-parse-url "http://host/foo/bar/?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" nil nil t))) + ;; example mentioned in RFC3986, section 5.4. Reference Resolution Examples + (should (equal (url-generic-parse-url "http://a/b/c/d;p?q") (url-parse-make-urlobj "http" nil nil "a" nil "/b/c/d;p?q" nil nil t)))) + +(ert-deftest url-generic-parse-url/same-document-reference () + "RFC 3986, section 4.4. Same-Document Reference / same-document reference: empty or number sign (\"#\") followed by a fragment identifier" + (should (equal (url-generic-parse-url "") (url-parse-make-urlobj nil nil nil nil nil "" nil nil nil))) + (should (equal (url-generic-parse-url "#") (url-parse-make-urlobj nil nil nil nil nil "" "" nil nil))) + (should (equal (url-generic-parse-url "#foo") (url-parse-make-urlobj nil nil nil nil nil "" "foo" nil nil)))) + +(provide 'url-parse-tests) + +;;; url-parse-tests.el ends here diff --git a/test/etags/lua-src/test.lua b/test/etags/lua-src/test.lua new file mode 100644 index 00000000000..405eb5f1de0 --- /dev/null +++ b/test/etags/lua-src/test.lua @@ -0,0 +1,36 @@ +Rectangle = {} +function Rectangle.getPos () +end + +Circle = {} +function Circle.getPos () +end + +Cube = {} +function Cube.data.getFoo () +end + +Square = {} +function Square.something:Bar () +end + +-- Comment line + -- Indented comment line + +test = {} + + function test.me_22a(one, two) + print"me_22a" + end + local function test.me22b (one) + print"me_22b" + end + + + test.i_123 = function (x) + print"i_123" +end + + +test.me_12a(1,2) +test.i_123(1) diff --git a/test/etags/ruby-src/test.rb b/test/etags/ruby-src/test.rb new file mode 100644 index 00000000000..9254c5bffa9 --- /dev/null +++ b/test/etags/ruby-src/test.rb @@ -0,0 +1,54 @@ +module ModuleExample + class ClassExample + def class_method + puts "in class_method" + end + def ClassExample.singleton_class_method + puts "in singleton_class_method" + end + def class_method_exclamation! + puts "in class_method_exclamation!" + end + def class_method_question? + puts "in class_method_question?" + end + def class_method_equals= + puts "in class_method_equals=" + end + def `(command) + return "just testing a backquote override" + end + def +(y) + @x + y + end + def [](y) + @ary[y] + end + def []=(y, val) + @ary[y] = val + end + def <<(y) + @x << y + end + def ==(y) + @ary.length == y.ary.length + end + def <=(y) + '@ary.length < y.ary.length' + end + def <=>(y) + nil + end + def ===(y) + self == y + end + end + def module_method + puts "in module_method" + end + def ModuleExample.singleton_module_method + puts "in singleton_module_method" + end +end + +ModuleExample::ClassExample.singleton_class_method diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby new file mode 100644 index 00000000000..43b1a14b95e --- /dev/null +++ b/test/etags/ruby-src/test1.ruby @@ -0,0 +1,7 @@ +class A + def a() + super(" do ") + end + def b() + end +end diff --git a/test/lisp/abbrev-tests.el b/test/lisp/abbrev-tests.el index 17aea5d0f82..37917ec5353 100644 --- a/test/lisp/abbrev-tests.el +++ b/test/lisp/abbrev-tests.el @@ -22,10 +22,21 @@ ;;; Commentary: +;; `kill-all-abbrevs-test' will remove all user *and* system abbrevs +;; if called noninteractively with the init file loaded. + ;;; Code: (require 'ert) (require 'abbrev) +(require 'seq) + +;; set up test abbrev table and abbrev entry +(defun setup-test-abbrev-table () + (defvar ert-test-abbrevs nil) + (define-abbrev-table 'ert-test-abbrevs '(("a-e-t" "abbrev-ert-test"))) + (abbrev-table-put ert-test-abbrevs :ert-test "ert-test-value") + ert-test-abbrevs) (ert-deftest abbrev-table-p-test () (should-not (abbrev-table-p 42)) @@ -70,5 +81,47 @@ (should (abbrev-table-p new-foo-abbrev-table))) (should-not (string-equal (buffer-name) "*Backtrace*"))) +(ert-deftest kill-all-abbrevs-test () + "Test undefining all defined abbrevs" + (unless noninteractive + (ert-skip "Cannot test kill-all-abbrevs in interactive mode")) + + (let ((num-tables 0)) + ;; ensure at least one abbrev exists + (should (abbrev-table-p (setup-test-abbrev-table))) + (setf num-tables (length abbrev-table-name-list)) + (kill-all-abbrevs) + + ;; no tables should have been removed/added + (should (= num-tables (length abbrev-table-name-list))) + ;; number of empty tables should be the same as number of tables + (should (= num-tables (length (seq-filter + (lambda (table) + (abbrev-table-empty-p (symbol-value table))) + abbrev-table-name-list)))))) + +(ert-deftest abbrev-table-name-test () + "Test returning name of abbrev-table" + (let ((ert-test-abbrevs (setup-test-abbrev-table)) + (no-such-table nil)) + (should (equal 'ert-test-abbrevs (abbrev-table-name ert-test-abbrevs))) + (should (equal nil (abbrev-table-name no-such-table))))) + +(ert-deftest clear-abbrev-table-test () + "Test clearing single abbrev table" + (let ((ert-test-abbrevs (setup-test-abbrev-table))) + (should (equal "a-e-t" (symbol-name + (abbrev-symbol "a-e-t" ert-test-abbrevs)))) + (should (equal "abbrev-ert-test" (symbol-value + (abbrev-symbol "a-e-t" ert-test-abbrevs)))) + + (clear-abbrev-table ert-test-abbrevs) + + (should (equal "nil" (symbol-name + (abbrev-symbol "a-e-t" ert-test-abbrevs)))) + (should (equal nil (symbol-value + (abbrev-symbol "a-e-t" ert-test-abbrevs)))) + (should (equal t (abbrev-table-empty-p ert-test-abbrevs))))) + (provide 'abbrev-tests) ;;; abbrev-tests.el ends here diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el index 6f186973ee7..043f80de49e 100644 --- a/test/lisp/autorevert-tests.el +++ b/test/lisp/autorevert-tests.el @@ -39,7 +39,9 @@ (null (string-match (format-message "Reverting buffer `%s'." (buffer-name buffer)) (buffer-string))) - (read-event nil nil 0.1))))) + (if (with-current-buffer buffer auto-revert-use-notify) + (read-event nil nil 0.1) + (sleep-for 0.1)))))) (ert-deftest auto-revert-test00-auto-revert-mode () "Check autorevert for a file." diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el index 7e05d49883e..829cbf2d765 100644 --- a/test/lisp/calendar/icalendar-tests.el +++ b/test/lisp/calendar/icalendar-tests.el @@ -2231,7 +2231,63 @@ END:VCALENDAR" Class: PUBLIC UID: 040000008200E00074C5B7101A82E0080000000020FFAED0CFEFCC01000000000000000010000000575268034ECDB649A15349B1BF240F15 " nil) + + ;; 2015-12-05, mixed line endings and empty lines, see Bug#22092. + (icalendar-tests--test-import + "BEGIN:VCALENDAR\r +PRODID:-//www.norwegian.no//iCalendar MIMEDIR//EN\r +VERSION:2.0\r +METHOD:REQUEST\r +BEGIN:VEVENT\r +UID:RFCALITEM1\r +SEQUENCE:1512040950\r +DTSTAMP:20141204T095043Z\r +ORGANIZER:noreply@norwegian.no\r +DTSTART:20141208T173000Z\r + +DTEND:20141208T215500Z\r + +LOCATION:Stavanger-Sola\r + +DESCRIPTION:Fly med Norwegian, reservasjon. Fra Stavanger til Tromsø 8. des 2014 18:30, DY545Fly med Norwegian, reservasjon . Fra Stavanger til Tromsø 8. des 2014 21:00, DY390\r + +X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\"><html><head><META NAME=\"Generator\" CONTENT=\"MS Exchange Server version 08.00.0681.000\"><title></title></head><body><b><font face=\"Calibri\" size=\"3\">Reisereferanse</p></body></html> +SUMMARY:Norwegian til Tromsoe-Langnes -\r + +CATEGORIES:Appointment\r + + +PRIORITY:5\r + +CLASS:PUBLIC\r + +TRANSP:OPAQUE\r +END:VEVENT\r +END:VCALENDAR +" +"&2014/12/8 18:30-22:55 Norwegian til Tromsoe-Langnes - + Desc: Fly med Norwegian, reservasjon. Fra Stavanger til Tromsø 8. des 2014 18:30, DY545Fly med Norwegian, reservasjon . Fra Stavanger til Tromsø 8. des 2014 21:00, DY390 + Location: Stavanger-Sola + Organizer: noreply@norwegian.no + Class: PUBLIC + UID: RFCALITEM1 +" +"&8/12/2014 18:30-22:55 Norwegian til Tromsoe-Langnes - + Desc: Fly med Norwegian, reservasjon. Fra Stavanger til Tromsø 8. des 2014 18:30, DY545Fly med Norwegian, reservasjon . Fra Stavanger til Tromsø 8. des 2014 21:00, DY390 + Location: Stavanger-Sola + Organizer: noreply@norwegian.no + Class: PUBLIC + UID: RFCALITEM1 +" +"&12/8/2014 18:30-22:55 Norwegian til Tromsoe-Langnes - + Desc: Fly med Norwegian, reservasjon. Fra Stavanger til Tromsø 8. des 2014 18:30, DY545Fly med Norwegian, reservasjon . Fra Stavanger til Tromsø 8. des 2014 21:00, DY390 + Location: Stavanger-Sola + Organizer: noreply@norwegian.no + Class: PUBLIC + UID: RFCALITEM1 +" ) + ) (provide 'icalendar-tests) ;;; icalendar-tests.el ends here diff --git a/test/lisp/character-fold-tests.el b/test/lisp/character-fold-tests.el index 2b1a15c9e76..c0568625649 100644 --- a/test/lisp/character-fold-tests.el +++ b/test/lisp/character-fold-tests.el @@ -37,13 +37,13 @@ (ert-deftest character-fold--test-consistency () - (dotimes (n 100) + (dotimes (n 30) (let ((w (character-fold--random-word n))) ;; A folded string should always match the original string. (character-fold--test-search-with-contents w w)))) (ert-deftest character-fold--test-lax-whitespace () - (dotimes (n 100) + (dotimes (n 40) (let ((w1 (character-fold--random-word n)) (w2 (character-fold--random-word n)) (search-spaces-regexp "\\s-+")) @@ -52,7 +52,73 @@ (concat w1 " " w2)) (character-fold--test-search-with-contents (concat w1 "\s\n\s\t\f\t\n\r\t" w2) - (concat w1 (make-string 90 ?\s) w2))))) + (concat w1 (make-string 10 ?\s) w2))))) + +(defun character-fold--test-match-exactly (string &rest strings-to-match) + (let ((re (concat "\\`" (character-fold-to-regexp string) "\\'"))) + (dolist (it strings-to-match) + (should (string-match re it))) + ;; Case folding + (let ((case-fold-search t)) + (dolist (it strings-to-match) + (should (string-match (upcase re) (downcase it))) + (should (string-match (downcase re) (upcase it))))))) + +(ert-deftest character-fold--test-some-defaults () + (dolist (it '(("ffl" . "ffl") ("ffi" . "ffi") + ("fi" . "fi") ("ff" . "ff") + ("ä" . "ä"))) + (character-fold--test-search-with-contents (cdr it) (car it)) + (let ((multi (char-table-extra-slot character-fold-table 0)) + (character-fold-table (make-char-table 'character-fold-table))) + (set-char-table-extra-slot character-fold-table 0 multi) + (character-fold--test-match-exactly (car it) (cdr it))))) + +(ert-deftest character-fold--test-fold-to-regexp () + (let ((character-fold-table (make-char-table 'character-fold-table)) + (multi (make-char-table 'character-fold-table))) + (set-char-table-extra-slot character-fold-table 0 multi) + (aset character-fold-table ?a "xx") + (aset character-fold-table ?1 "44") + (aset character-fold-table ?\s "-!-") + (character-fold--test-match-exactly "a1a1" "xx44xx44") + (character-fold--test-match-exactly "a1 a 1" "xx44-!--!-xx-!-44") + (aset multi ?a '(("1" . "99") + ("2" . "88") + ("12" . "77"))) + (character-fold--test-match-exactly "a" "xx") + (character-fold--test-match-exactly "a1" "xx44" "99") + (character-fold--test-match-exactly "a12" "77" "xx442" "992") + (character-fold--test-match-exactly "a2" "88") + (aset multi ?1 '(("2" . "yy"))) + (character-fold--test-match-exactly "a1" "xx44" "99") + (character-fold--test-match-exactly "a12" "77" "xx442" "992") + ;; Support for this case is disabled. See function definition or: + ;; https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02562.html + ;; (character-fold--test-match-exactly "a12" "xxyy") + )) + +(ert-deftest character-fold--speed-test () + (dolist (string (append '("tty-set-up-initial-frame-face" + "tty-set-up-initial-frame-face-frame-faceframe-faceframe-faceframe-face") + (mapcar #'character-fold--random-word '(10 50 100 + 50 100)))) + (message "Testing %s" string) + ;; Make sure we didn't just fallback on the trivial search. + (should-not (string= (regexp-quote string) + (character-fold-to-regexp string))) + (with-temp-buffer + (save-excursion (insert string)) + (let ((time (time-to-seconds (current-time)))) + ;; Our initial implementation of case-folding in char-folding + ;; created a lot of redundant paths in the regexp. Because of + ;; that, if a really long string "almost" matches, the regexp + ;; engine took a long time to realize that it doesn't match. + (should-not (character-fold-search-forward (concat string "c") nil 'noerror)) + ;; Ensure it took less than a second. + (should (< (- (time-to-seconds (current-time)) + time) + 1)))))) (provide 'character-fold-tests) ;;; character-fold-tests.el ends here diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 6b3069c2a54..7206084f324 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -242,6 +242,20 @@ Must called from within a `tar-mode' buffer." (should (package-installed-p 'simple-single)) (should (package-installed-p 'simple-depend)))) +(ert-deftest package-test-macro-compilation () + "Install a package which includes a dependency." + (with-package-test (:basedir "data/package") + (package-install-file (expand-file-name "macro-problem-package-1.0/")) + (require 'macro-problem) + ;; `macro-problem-func' uses a macro from `macro-aux'. + (should (equal (macro-problem-func) '(progn a b))) + (package-install-file (expand-file-name "macro-problem-package-2.0/")) + ;; After upgrading, `macro-problem-func' depends on a new version + ;; of the macro from `macro-aux'. + (should (equal (macro-problem-func) '(1 b))) + ;; `macro-problem-10-and-90' depends on an entirely new macro from `macro-aux'. + (should (equal (macro-problem-10-and-90) '(10 90))))) + (ert-deftest package-test-install-two-dependencies () "Install a package which includes a dependency." (with-package-test () diff --git a/test/lisp/faces-tests.el b/test/lisp/faces-tests.el index 007bc805120..ff9dfc53fbe 100644 --- a/test/lisp/faces-tests.el +++ b/test/lisp/faces-tests.el @@ -38,6 +38,11 @@ (should (equal (background-color-at-point) "black")) (should (equal (foreground-color-at-point) "black"))) (with-temp-buffer + (insert (propertize "STRING" 'face '(:foreground "black" :background "black"))) + (goto-char (point-min)) + (should (equal (background-color-at-point) "black")) + (should (equal (foreground-color-at-point) "black"))) + (with-temp-buffer (emacs-lisp-mode) (setq-local font-lock-comment-face 'faces--test1) (setq-local font-lock-constant-face 'faces--test2) diff --git a/test/lisp/gnus/auth-source-tests.el b/test/lisp/gnus/auth-source-tests.el index 0b49b9013f7..dd70d546d5c 100644 --- a/test/lisp/gnus/auth-source-tests.el +++ b/test/lisp/gnus/auth-source-tests.el @@ -174,5 +174,50 @@ (:search-function . auth-source-secrets-search) (:create-function . auth-source-secrets-create))))) +(defun auth-source--test-netrc-parse-entry (entry host user port) + "Parse a netrc entry from buffer." + (auth-source-forget-all-cached) + (setq port (auth-source-ensure-strings port)) + (with-temp-buffer + (insert entry) + (goto-char (point-min)) + (let* ((check (lambda(alist) + (and alist + (auth-source-search-collection + host + (or + (auth-source--aget alist "machine") + (auth-source--aget alist "host") + t)) + (auth-source-search-collection + user + (or + (auth-source--aget alist "login") + (auth-source--aget alist "account") + (auth-source--aget alist "user") + t)) + (auth-source-search-collection + port + (or + (auth-source--aget alist "port") + (auth-source--aget alist "protocol") + t))))) + (entries (auth-source-netrc-parse-entries check 1))) + entries))) + +(ert-deftest auth-source-test-netrc-parse-entry () + (should (equal (auth-source--test-netrc-parse-entry + "machine mymachine1 login user1 password pass1\n" t t t) + '((("password" . "pass1") + ("login" . "user1") + ("machine" . "mymachine1"))))) + (should (equal (auth-source--test-netrc-parse-entry + "machine mymachine1 login user1 password pass1 port 100\n" + t t t) + '((("port" . "100") + ("password" . "pass1") + ("login" . "user1") + ("machine" . "mymachine1")))))) + (provide 'auth-source-tests) ;;; auth-source-tests.el ends here diff --git a/test/lisp/gnus/message-tests.el b/test/lisp/gnus/message-tests.el index 49a72b0e67a..790b5c15125 100644 --- a/test/lisp/gnus/message-tests.el +++ b/test/lisp/gnus/message-tests.el @@ -40,9 +40,9 @@ "and here's a closer ") (let ((last-command-event ?\))) (ert-simulate-command '(self-insert-command 1))) - ;; Syntax propertization doesn't kick in batch mode - (when noninteractive - (syntax-propertize (point-max))) + ;; Auto syntax propertization doesn't kick in until + ;; parse-sexp-lookup-properties is set. + (setq-local parse-sexp-lookup-properties t) (backward-sexp) (should (string= "here's an opener " (buffer-substring-no-properties diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el index b8772eb84d6..79e90f7819c 100644 --- a/test/lisp/help-fns-tests.el +++ b/test/lisp/help-fns-tests.el @@ -57,4 +57,14 @@ (should (search-forward "(defgh\\\\\\[universal-argument\\]b\\`c\\'d\\\\e\\\"f X)")))) +(ert-deftest help-fns-test-describe-symbol () + "Test the `describe-symbol' function." + ;; 'describe-symbol' would originally signal an error for + ;; 'font-lock-comment-face'. + (describe-symbol 'font-lock-comment-face) + (with-current-buffer "*Help*" + (should (> (point-max) 1)) + (goto-char (point-min)) + (should (looking-at "^font-lock-comment-face is ")))) + ;;; help-fns.el ends here diff --git a/test/lisp/json-tests.el b/test/lisp/json-tests.el index 8f0cd6f0857..bb043dc4e05 100644 --- a/test/lisp/json-tests.el +++ b/test/lisp/json-tests.el @@ -22,6 +22,38 @@ (require 'ert) (require 'json) +(defmacro json-tests--with-temp-buffer (content &rest body) + "Create a temporary buffer with CONTENT and evaluate BODY there. +Point is moved to beginning of the buffer." + (declare (indent 1)) + `(with-temp-buffer + (insert ,content) + (goto-char (point-min)) + ,@body)) + +;;; Utilities + +(ert-deftest test-json-join () + (should (equal (json-join '() ", ") "")) + (should (equal (json-join '("a" "b" "c") ", ") "a, b, c"))) + +(ert-deftest test-json-alist-p () + (should (json-alist-p '())) + (should (json-alist-p '((a 1) (b 2) (c 3)))) + (should (json-alist-p '((:a 1) (:b 2) (:c 3)))) + (should (json-alist-p '(("a" 1) ("b" 2) ("c" 3)))) + (should-not (json-alist-p '(:a :b :c))) + (should-not (json-alist-p '(:a 1 :b 2 :c 3))) + (should-not (json-alist-p '((:a 1) (:b 2) 3)))) + +(ert-deftest test-json-plist-p () + (should (json-plist-p '())) + (should (json-plist-p '(:a 1 :b 2 :c 3))) + (should-not (json-plist-p '(a 1 b 2 c 3))) + (should-not (json-plist-p '("a" 1 "b" 2 "c" 3))) + (should-not (json-plist-p '(:a :b :c))) + (should-not (json-plist-p '((:a 1) (:b 2) (:c 3))))) + (ert-deftest test-json-plist-reverse () (should (equal (json--plist-reverse '()) '())) (should (equal (json--plist-reverse '(:a 1)) '(:a 1))) @@ -34,49 +66,32 @@ (should (equal (json--plist-to-alist '(:a 1 :b 2 :c 3)) '((:a . 1) (:b . 2) (:c . 3))))) -(ert-deftest test-json-encode-plist () - (let ((plist '(:a 1 :b 2))) - (should (equal (json-encode plist) "{\"a\":1,\"b\":2}")))) - -(ert-deftest json-encode-simple-alist () - (should (equal (json-encode '((a . 1) - (b . 2))) - "{\"a\":1,\"b\":2}"))) - -(ert-deftest test-json-encode-hash-table () - (let ((hash-table (make-hash-table)) - (json-encoding-object-sort-predicate 'string<)) - (puthash :a 1 hash-table) - (puthash :b 2 hash-table) - (puthash :c 3 hash-table) - (should (equal (json-encode hash-table) - "{\"a\":1,\"b\":2,\"c\":3}")))) - -(ert-deftest test-json-encode-alist-with-sort-predicate () - (let ((alist '((:c . 3) (:a . 1) (:b . 2))) - (json-encoding-object-sort-predicate 'string<)) - (should (equal (json-encode alist) "{\"a\":1,\"b\":2,\"c\":3}")))) +(ert-deftest test-json-advance () + (json-tests--with-temp-buffer "{ \"a\": 1 }" + (json-advance 0) + (should (= (point) (point-min))) + (json-advance 3) + (should (= (point) (+ (point-min) 3))))) -(ert-deftest test-json-encode-plist-with-sort-predicate () - (let ((plist '(:c 3 :a 1 :b 2)) - (json-encoding-object-sort-predicate 'string<)) - (should (equal (json-encode plist) "{\"a\":1,\"b\":2,\"c\":3}")))) +(ert-deftest test-json-peek () + (json-tests--with-temp-buffer "" + (should (eq (json-peek) :json-eof))) + (json-tests--with-temp-buffer "{ \"a\": 1 }" + (should (equal (json-peek) ?{)))) -(ert-deftest json-read-simple-alist () - (let ((json-object-type 'alist)) - (should (equal (json-read-from-string "{\"a\": 1, \"b\": 2}") - '((a . 1) - (b . 2)))))) +(ert-deftest test-json-pop () + (json-tests--with-temp-buffer "" + (should-error (json-pop) :type 'json-end-of-file)) + (json-tests--with-temp-buffer "{ \"a\": 1 }" + (should (equal (json-pop) ?{)) + (should (= (point) (+ (point-min) 1))))) -(ert-deftest json-encode-string-with-special-chars () - (should (equal (json-encode-string "a\n\fb") - "\"a\\n\\fb\"")) - (should (equal (json-encode-string "\nasdфыв\u001f\u007ffgh\t") - "\"\\nasdфыв\\u001f\u007ffgh\\t\""))) +(ert-deftest test-json-skip-whitespace () + (json-tests--with-temp-buffer "\t\r\n\f\b { \"a\": 1 }" + (json-skip-whitespace) + (should (equal (char-after (point)) ?{)))) -(ert-deftest json-read-string-with-special-chars () - (should (equal (json-read-from-string "\"\\nasd\\u0444\\u044b\\u0432fgh\\t\"") - "\nasdфывfgh\t"))) +;;; Paths (ert-deftest test-json-path-to-position-with-objects () (let* ((json-string "{\"foo\": {\"bar\": {\"baz\": \"value\"}}}") @@ -97,5 +112,209 @@ (matched-path (json-path-to-position 5 json-string))) (should (null matched-path)))) +;;; Keywords + +(ert-deftest test-json-read-keyword () + (json-tests--with-temp-buffer "true" + (should (json-read-keyword "true"))) + (json-tests--with-temp-buffer "true" + (should-error + (json-read-keyword "false") :type 'json-unknown-keyword)) + (json-tests--with-temp-buffer "foo" + (should-error + (json-read-keyword "foo") :type 'json-unknown-keyword))) + +(ert-deftest test-json-encode-keyword () + (should (equal (json-encode-keyword t) "true")) + (should (equal (json-encode-keyword json-false) "false")) + (should (equal (json-encode-keyword json-null) "null"))) + +;;; Numbers + +(ert-deftest test-json-read-number () + (json-tests--with-temp-buffer "3" + (should (= (json-read-number) 3))) + (json-tests--with-temp-buffer "-5" + (should (= (json-read-number) -5))) + (json-tests--with-temp-buffer "123.456" + (should (= (json-read-number) 123.456))) + (json-tests--with-temp-buffer "1e3" + (should (= (json-read-number) 1e3))) + (json-tests--with-temp-buffer "2e+3" + (should (= (json-read-number) 2e3))) + (json-tests--with-temp-buffer "3E3" + (should (= (json-read-number) 3e3))) + (json-tests--with-temp-buffer "1e-7" + (should (= (json-read-number) 1e-7))) + (json-tests--with-temp-buffer "abc" + (should-error (json-read-number) :type 'json-number-format))) + +(ert-deftest test-json-encode-number () + (should (equal (json-encode-number 3) "3")) + (should (equal (json-encode-number -5) "-5")) + (should (equal (json-encode-number 123.456) "123.456"))) + +;; Strings + +(ert-deftest test-json-read-escaped-char () + (json-tests--with-temp-buffer "\\\"" + (should (equal (json-read-escaped-char) ?\")))) + +(ert-deftest test-json-read-string () + (json-tests--with-temp-buffer "\"foo \\\"bar\\\"\"" + (should (equal (json-read-string) "foo \"bar\""))) + (json-tests--with-temp-buffer "\"abcαβγ\"" + (should (equal (json-read-string) "abcαβγ"))) + (json-tests--with-temp-buffer "\"\\nasd\\u0444\\u044b\\u0432fgh\\t\"" + (should (equal (json-read-string) "\nasdфывfgh\t"))) + (json-tests--with-temp-buffer "foo" + (should-error (json-read-string) :type 'json-string-format))) + +(ert-deftest test-json-encode-string () + (should (equal (json-encode-string "foo") "\"foo\"")) + (should (equal (json-encode-string "a\n\fb") "\"a\\n\\fb\"")) + (should (equal (json-encode-string "\nasdфыв\u001f\u007ffgh\t") + "\"\\nasdфыв\\u001f\u007ffgh\\t\""))) + +(ert-deftest test-json-encode-key () + (should (equal (json-encode-key "foo") "\"foo\"")) + (should (equal (json-encode-key 'foo) "\"foo\"")) + (should (equal (json-encode-key :foo) "\"foo\"")) + (should-error (json-encode-key 5) :type 'json-key-format) + (should-error (json-encode-key ["foo"]) :type 'json-key-format) + (should-error (json-encode-key '("foo")) :type 'json-key-format)) + +;;; Objects + +(ert-deftest test-json-new-object () + (let ((json-object-type 'alist)) + (should (equal (json-new-object) '()))) + (let ((json-object-type 'plist)) + (should (equal (json-new-object) '()))) + (let* ((json-object-type 'hash-table) + (json-object (json-new-object))) + (should (hash-table-p json-object)) + (should (= (hash-table-count json-object) 0)))) + +(ert-deftest test-json-add-to-object () + (let* ((json-object-type 'alist) + (json-key-type nil) + (obj (json-new-object))) + (setq obj (json-add-to-object obj "a" 1)) + (setq obj (json-add-to-object obj "b" 2)) + (should (equal (assq 'a obj) '(a . 1))) + (should (equal (assq 'b obj) '(b . 2)))) + (let* ((json-object-type 'plist) + (json-key-type nil) + (obj (json-new-object))) + (setq obj (json-add-to-object obj "a" 1)) + (setq obj (json-add-to-object obj "b" 2)) + (should (= (plist-get obj :a) 1)) + (should (= (plist-get obj :b) 2))) + (let* ((json-object-type 'hash-table) + (json-key-type nil) + (obj (json-new-object))) + (setq obj (json-add-to-object obj "a" 1)) + (setq obj (json-add-to-object obj "b" 2)) + (should (= (gethash "a" obj) 1)) + (should (= (gethash "b" obj) 2)))) + +(ert-deftest test-json-read-object () + (json-tests--with-temp-buffer "{ \"a\": 1, \"b\": 2 }" + (let ((json-object-type 'alist)) + (should (equal (json-read-object) '((a . 1) (b . 2)))))) + (json-tests--with-temp-buffer "{ \"a\": 1, \"b\": 2 }" + (let ((json-object-type 'plist)) + (should (equal (json-read-object) '(:a 1 :b 2))))) + (json-tests--with-temp-buffer "{ \"a\": 1, \"b\": 2 }" + (let* ((json-object-type 'hash-table) + (hash-table (json-read-object))) + (should (= (gethash "a" hash-table) 1)) + (should (= (gethash "b" hash-table) 2)))) + (json-tests--with-temp-buffer "{ \"a\": 1 \"b\": 2 }" + (should-error (json-read-object) :type 'json-object-format))) + +(ert-deftest test-json-encode-hash-table () + (let ((hash-table (make-hash-table)) + (json-encoding-object-sort-predicate 'string<) + (json-encoding-pretty-print nil)) + (puthash :a 1 hash-table) + (puthash :b 2 hash-table) + (puthash :c 3 hash-table) + (should (equal (json-encode hash-table) + "{\"a\":1,\"b\":2,\"c\":3}")))) + +(ert-deftest json-encode-simple-alist () + (let ((json-encoding-pretty-print nil)) + (should (equal (json-encode '((a . 1) (b . 2))) + "{\"a\":1,\"b\":2}")))) + +(ert-deftest test-json-encode-plist () + (let ((plist '(:a 1 :b 2)) + (json-encoding-pretty-print nil)) + (should (equal (json-encode plist) "{\"a\":1,\"b\":2}")))) + +(ert-deftest test-json-encode-plist-with-sort-predicate () + (let ((plist '(:c 3 :a 1 :b 2)) + (json-encoding-object-sort-predicate 'string<) + (json-encoding-pretty-print nil)) + (should (equal (json-encode plist) "{\"a\":1,\"b\":2,\"c\":3}")))) + +(ert-deftest test-json-encode-alist-with-sort-predicate () + (let ((alist '((:c . 3) (:a . 1) (:b . 2))) + (json-encoding-object-sort-predicate 'string<) + (json-encoding-pretty-print nil)) + (should (equal (json-encode alist) "{\"a\":1,\"b\":2,\"c\":3}")))) + +(ert-deftest test-json-encode-list () + (let ((json-encoding-pretty-print nil)) + (should (equal (json-encode-list '(:a 1 :b 2)) + "{\"a\":1,\"b\":2}")) + (should (equal (json-encode-list '((:a . 1) (:b . 2))) + "{\"a\":1,\"b\":2}")) + (should (equal (json-encode-list '(1 2 3 4)) "[1,2,3,4]")))) + +;;; Arrays + +(ert-deftest test-json-read-array () + (let ((json-array-type 'vector)) + (json-tests--with-temp-buffer "[1, 2, \"a\", \"b\"]" + (should (equal (json-read-array) [1 2 "a" "b"])))) + (let ((json-array-type 'list)) + (json-tests--with-temp-buffer "[1, 2, \"a\", \"b\"]" + (should (equal (json-read-array) '(1 2 "a" "b"))))) + (json-tests--with-temp-buffer "[1 2]" + (should-error (json-read-array) :type 'json-error))) + +(ert-deftest test-json-encode-array () + (let ((json-encoding-pretty-print nil)) + (should (equal (json-encode-array [1 2 "a" "b"]) + "[1,2,\"a\",\"b\"]")))) + +;;; Reader + +(ert-deftest test-json-read () + (json-tests--with-temp-buffer "{ \"a\": 1 }" + ;; We don't care exactly what the return value is (that is tested + ;; in `test-json-read-object'), but it should parse without error. + (should (json-read))) + (json-tests--with-temp-buffer "" + (should-error (json-read) :type 'json-end-of-file)) + (json-tests--with-temp-buffer "xxx" + (should-error (json-read) :type 'json-readtable-error))) + +(ert-deftest test-json-read-from-string () + (let ((json-string "{ \"a\": 1 }")) + (json-tests--with-temp-buffer json-string + (should (equal (json-read-from-string json-string) + (json-read)))))) + +;;; JSON encoder + +(ert-deftest test-json-encode () + (should (equal (json-encode "foo") "\"foo\"")) + (with-temp-buffer + (should-error (json-encode (current-buffer)) :type 'json-error))) + (provide 'json-tests) ;;; json-tests.el ends here diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index c5cab7d5991..23171d6e983 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -1608,6 +1608,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (vc-handled-backends (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (cond + ((tramp-find-executable v vc-git-program (tramp-get-remote-path v)) + '(Git)) + ((tramp-find-executable v vc-hg-program (tramp-get-remote-path v)) + '(Hg)) ((tramp-find-executable v vc-bzr-program (tramp-get-remote-path v)) (setq tramp-remote-process-environment (cons (format "BZR_HOME=%s" @@ -1618,10 +1622,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (tramp-dissect-file-name tramp-test-temporary-file-directory) nil 'keep-password) '(Bzr)) - ((tramp-find-executable v vc-git-program (tramp-get-remote-path v)) - '(Git)) - ((tramp-find-executable v vc-hg-program (tramp-get-remote-path v)) - '(Hg)) (t nil))))) (skip-unless vc-handled-backends) (message "%s" vc-handled-backends) @@ -1637,7 +1637,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (let ((default-directory tmp-name1)) ;; Create empty repository, and register the file. - (vc-create-repo (car vc-handled-backends)) + ;; Sometimes, creation of repository fails (bzr!); we skip + ;; the test then. + (condition-case nil + (vc-create-repo (car vc-handled-backends)) + (error (skip-unless nil))) ;; The structure of VC-FILESET is not documented. Let's ;; hope it won't change. (condition-case nil @@ -1772,6 +1776,14 @@ Several special characters do not work properly there." (file-truename tramp-test-temporary-file-directory) nil (string-match "^HP-UX" (tramp-get-connection-property v "uname" "")))) +(defun tramp--test-darwin-p () + "Check, whether the remote host runs Mac OS X. +Several special characters do not work properly there." + ;; We must refill the cache. `file-truename' does it. + (with-parsed-tramp-file-name + (file-truename tramp-test-temporary-file-directory) nil + (string-match "^Darwin" (tramp-get-connection-property v "uname" "")))) + (defun tramp--test-check-files (&rest files) "Run a simple but comprehensive test over every file in FILES." ;; We must use `file-truename' for the temporary directory, because @@ -1987,7 +1999,10 @@ Use the `perl' command." (let ((tramp-connection-properties (append `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) - "stat" nil)) + "stat" nil) + ;; See `tramp-sh-handle-file-truename'. + (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "readlink" nil)) tramp-connection-properties))) (tramp--test-special-characters))) @@ -2005,21 +2020,25 @@ Use the `ls' command." `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) "perl" nil) (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) - "stat" nil)) + "stat" nil) + ;; See `tramp-sh-handle-file-truename'. + (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "readlink" nil)) tramp-connection-properties))) (tramp--test-special-characters))) (defun tramp--test-utf8 () "Perform the test in `tramp-test32-utf8*'." + (tramp--instrument-test-case 10 (let ((coding-system-for-read 'utf-8) (coding-system-for-write 'utf-8) (file-name-coding-system 'utf-8)) (tramp--test-check-files (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") - (unless (tramp--test-hpux-p) + (unless (or (tramp--test-hpux-p) (tramp--test-darwin-p)) "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") "银河系漫游指南系列" - "Автостопом по гала́ктике"))) + "Автостопом по гала́ктике")))) (ert-deftest tramp-test32-utf8 () "Check UTF8 encoding in file names and file contents." @@ -2059,7 +2078,10 @@ Use the `perl' command." (let ((tramp-connection-properties (append `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) - "stat" nil)) + "stat" nil) + ;; See `tramp-sh-handle-file-truename'. + (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "readlink" nil)) tramp-connection-properties))) (tramp--test-utf8))) @@ -2077,7 +2099,10 @@ Use the `ls' command." `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) "perl" nil) (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) - "stat" nil)) + "stat" nil) + ;; See `tramp-sh-handle-file-truename'. + (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "readlink" nil)) tramp-connection-properties))) (tramp--test-utf8))) diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 97f86a969aa..2d0452f69d7 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -543,7 +543,7 @@ to (xref-elisp-test-descr-to-target xref)." ;; FIXME: deftype (xref-elisp-deftest find-defs-defun-c-defvar-c - (elisp--xref-find-definitions 'system-name) + (xref-backend-definitions 'elisp "system-name") (list (xref-make "(defvar system-name)" (xref-make-elisp-location 'system-name 'defvar "src/editfns.c")) @@ -552,7 +552,7 @@ to (xref-elisp-test-descr-to-target xref)." ) (xref-elisp-deftest find-defs-defun-el-defvar-c - (elisp--xref-find-definitions 'abbrev-mode) + (xref-backend-definitions 'elisp "abbrev-mode") ;; It's a minor mode, but the variable is defined in buffer.c (list (xref-make "(defvar abbrev-mode)" diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 07b5eaa93e4..771241ad7ef 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -138,6 +138,12 @@ (open-line 1))) '("- - " . "\n(a b c d)")))) +;; For a while, from 24 Oct - 21 Nov 2015, `open-line' in the Emacs +;; development tree became sensitive to `electric-indent-mode', which +;; it had not been before. This sensitivity was reverted for the +;; Emacs 25 release, so it could be discussed further (see thread +;; "Questioning the new behavior of `open-line'." on the Emacs Devel +;; mailing list, and bug #21884). (ert-deftest open-line-indent () (should (equal (simple-test--dummy-buffer (electric-indent-local-mode 1) @@ -145,29 +151,34 @@ '("(a b" . "\n c d)"))) (should (equal (simple-test--dummy-buffer (electric-indent-local-mode 1) - (open-line 1 'interactive)) - '("(a b" . "\n c d)"))) + (open-line 1)) + '("(a b" . "\n c d)"))) (should (equal (simple-test--dummy-buffer (electric-indent-local-mode 1) (let ((current-prefix-arg nil)) (call-interactively #'open-line) (call-interactively #'open-line))) - '("(a b" . "\n\n c d)"))) + '("(a b" . "\n\n c d)"))) (should (equal (simple-test--dummy-buffer (electric-indent-local-mode 1) - (open-line 5 'interactive)) - '("(a b" . "\n\n\n\n\n c d)"))) + (open-line 5)) + '("(a b" . "\n\n\n\n\n c d)"))) (should (equal (simple-test--dummy-buffer (electric-indent-local-mode 1) (let ((current-prefix-arg 5)) (call-interactively #'open-line))) - '("(a b" . "\n\n\n\n\n c d)"))) + '("(a b" . "\n\n\n\n\n c d)"))) (should (equal (simple-test--dummy-buffer (forward-char 1) (electric-indent-local-mode 1) - (open-line 1 'interactive)) - '("(a b" . "\n c d)")))) + (open-line 1)) + '("(a b " . "\nc d)")))) +;; From 24 Oct - 21 Nov 2015, `open-line' took a second argument +;; INTERACTIVE and ran `post-self-insert-hook' if the argument was +;; true. This test tested that. Currently, however, `open-line' +;; does not run run `post-self-insert-hook' at all, so for now +;; this test just makes sure that it doesn't. (ert-deftest open-line-hook () (let* ((x 0) (inc (lambda () (setq x (1+ x))))) @@ -177,18 +188,18 @@ (should (= x 0)) (simple-test--dummy-buffer (add-hook 'post-self-insert-hook inc nil 'local) - (open-line 1 'interactive)) - (should (= x 1)) + (open-line 1)) + (should (= x 0)) (unwind-protect (progn (add-hook 'post-self-insert-hook inc) (simple-test--dummy-buffer (open-line 1)) - (should (= x 1)) + (should (= x 0)) (simple-test--dummy-buffer - (open-line 10 'interactive)) - (should (= x 2))) + (open-line 10)) + (should (= x 0))) (remove-hook 'post-self-insert-hook inc)))) @@ -215,9 +226,9 @@ ;;; auto-boundary tests -(ert-deftest undo-auto--boundary-timer () +(ert-deftest undo-auto-boundary-timer () (should - undo-auto--current-boundary-timer)) + undo-auto-current-boundary-timer)) (ert-deftest undo-auto--boundaries-added () ;; The change in the buffer should have caused addition @@ -252,5 +263,53 @@ '("(s1) (s4)" . " (s2) (s3) (s5)")))) +;; Test for a regression introduced by undo-auto--boundaries changes. +;; https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01652.html +(defun undo-test-kill-c-a-then-undo () + (with-temp-buffer + (switch-to-buffer (current-buffer)) + (setq buffer-undo-list nil) + (insert "a\nb\n\c\n") + (goto-char (point-max)) + ;; We use a keyboard macro because it adds undo events in the same + ;; way as if a user were involved. + (kmacro-call-macro nil nil nil + [left + ;; Delete "c" + backspace + left left left + ;; Delete "a" + backspace + ;; C-/ or undo + 67108911 + ]) + (point))) + +(defun undo-test-point-after-forward-kill () + (with-temp-buffer + (switch-to-buffer (current-buffer)) + (setq buffer-undo-list nil) + (insert "kill word forward") + ;; Move to word "word". + (goto-char 6) + (kmacro-call-macro nil nil nil + [ + ;; kill-word + C-delete + ;; undo + 67108911 + ]) + (point))) + +(ert-deftest undo-point-in-wrong-place () + (should + ;; returns 5 with the bug + (= 2 + (undo-test-kill-c-a-then-undo))) + (should + (= 6 + (undo-test-point-after-forward-kill)))) + + (provide 'simple-test) ;;; simple-test.el ends here diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index ee8db593b49..3fcb7d346a3 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -103,5 +103,117 @@ (should (equal (macroexpand-all '(when a b c d)) '(if a (progn b c d))))) +(ert-deftest subr-test-version-parsing () + (should (equal (version-to-list ".5") '(0 5))) + (should (equal (version-to-list "0.9 alpha1") '(0 9 -3 1))) + (should (equal (version-to-list "0.9 snapshot") '(0 9 -4))) + (should (equal (version-to-list "0.9-alpha1") '(0 9 -3 1))) + (should (equal (version-to-list "0.9-snapshot") '(0 9 -4))) + (should (equal (version-to-list "0.9.snapshot") '(0 9 -4))) + (should (equal (version-to-list "0.9_snapshot") '(0 9 -4))) + (should (equal (version-to-list "0.9alpha1") '(0 9 -3 1))) + (should (equal (version-to-list "0.9snapshot") '(0 9 -4))) + (should (equal (version-to-list "1.0 git") '(1 0 -4))) + (should (equal (version-to-list "1.0 pre2") '(1 0 -1 2))) + (should (equal (version-to-list "1.0-git") '(1 0 -4))) + (should (equal (version-to-list "1.0-pre2") '(1 0 -1 2))) + (should (equal (version-to-list "1.0.1-a") '(1 0 1 1))) + (should (equal (version-to-list "1.0.1-f") '(1 0 1 6))) + (should (equal (version-to-list "1.0.1.a") '(1 0 1 1))) + (should (equal (version-to-list "1.0.1.f") '(1 0 1 6))) + (should (equal (version-to-list "1.0.1_a") '(1 0 1 1))) + (should (equal (version-to-list "1.0.1_f") '(1 0 1 6))) + (should (equal (version-to-list "1.0.1a") '(1 0 1 1))) + (should (equal (version-to-list "1.0.1f") '(1 0 1 6))) + (should (equal (version-to-list "1.0.7.5") '(1 0 7 5))) + (should (equal (version-to-list "1.0.git") '(1 0 -4))) + (should (equal (version-to-list "1.0.pre2") '(1 0 -1 2))) + (should (equal (version-to-list "1.0_git") '(1 0 -4))) + (should (equal (version-to-list "1.0_pre2") '(1 0 -1 2))) + (should (equal (version-to-list "1.0git") '(1 0 -4))) + (should (equal (version-to-list "1.0pre2") '(1 0 -1 2))) + (should (equal (version-to-list "22.8 beta3") '(22 8 -2 3))) + (should (equal (version-to-list "22.8-beta3") '(22 8 -2 3))) + (should (equal (version-to-list "22.8.beta3") '(22 8 -2 3))) + (should (equal (version-to-list "22.8_beta3") '(22 8 -2 3))) + (should (equal (version-to-list "22.8beta3") '(22 8 -2 3))) + (should (equal (version-to-list "6.9.30 Beta") '(6 9 30 -2))) + (should (equal (version-to-list "6.9.30-Beta") '(6 9 30 -2))) + (should (equal (version-to-list "6.9.30.Beta") '(6 9 30 -2))) + (should (equal (version-to-list "6.9.30Beta") '(6 9 30 -2))) + (should (equal (version-to-list "6.9.30_Beta") '(6 9 30 -2))) + + (should (equal + (error-message-string (should-error (version-to-list "OTP-18.1.5"))) + "Invalid version syntax: `OTP-18.1.5' (must start with a number)")) + (should (equal + (error-message-string (should-error (version-to-list ""))) + "Invalid version syntax: `' (must start with a number)")) + (should (equal + (error-message-string (should-error (version-to-list "1.0..7.5"))) + "Invalid version syntax: `1.0..7.5'")) + (should (equal + (error-message-string (should-error (version-to-list "1.0prepre2"))) + "Invalid version syntax: `1.0prepre2'")) + (should (equal + (error-message-string (should-error (version-to-list "22.8X3"))) + "Invalid version syntax: `22.8X3'")) + (should (equal + (error-message-string (should-error (version-to-list "beta22.8alpha3"))) + "Invalid version syntax: `beta22.8alpha3' (must start with a number)")) + (should (equal + (error-message-string (should-error (version-to-list "honk"))) + "Invalid version syntax: `honk' (must start with a number)")) + (should (equal + (error-message-string (should-error (version-to-list 9))) + "Version must be a string")) + + (let ((version-separator "_")) + (should (equal (version-to-list "_5") '(0 5))) + (should (equal (version-to-list "0_9 alpha1") '(0 9 -3 1))) + (should (equal (version-to-list "0_9 snapshot") '(0 9 -4))) + (should (equal (version-to-list "0_9-alpha1") '(0 9 -3 1))) + (should (equal (version-to-list "0_9-snapshot") '(0 9 -4))) + (should (equal (version-to-list "0_9.alpha1") '(0 9 -3 1))) + (should (equal (version-to-list "0_9.snapshot") '(0 9 -4))) + (should (equal (version-to-list "0_9alpha1") '(0 9 -3 1))) + (should (equal (version-to-list "0_9snapshot") '(0 9 -4))) + (should (equal (version-to-list "1_0 git") '(1 0 -4))) + (should (equal (version-to-list "1_0 pre2") '(1 0 -1 2))) + (should (equal (version-to-list "1_0-git") '(1 0 -4))) + (should (equal (version-to-list "1_0.pre2") '(1 0 -1 2))) + (should (equal (version-to-list "1_0_1-a") '(1 0 1 1))) + (should (equal (version-to-list "1_0_1-f") '(1 0 1 6))) + (should (equal (version-to-list "1_0_1.a") '(1 0 1 1))) + (should (equal (version-to-list "1_0_1.f") '(1 0 1 6))) + (should (equal (version-to-list "1_0_1_a") '(1 0 1 1))) + (should (equal (version-to-list "1_0_1_f") '(1 0 1 6))) + (should (equal (version-to-list "1_0_1a") '(1 0 1 1))) + (should (equal (version-to-list "1_0_1f") '(1 0 1 6))) + (should (equal (version-to-list "1_0_7_5") '(1 0 7 5))) + (should (equal (version-to-list "1_0_git") '(1 0 -4))) + (should (equal (version-to-list "1_0pre2") '(1 0 -1 2))) + (should (equal (version-to-list "22_8 beta3") '(22 8 -2 3))) + (should (equal (version-to-list "22_8-beta3") '(22 8 -2 3))) + (should (equal (version-to-list "22_8.beta3") '(22 8 -2 3))) + (should (equal (version-to-list "22_8beta3") '(22 8 -2 3))) + (should (equal (version-to-list "6_9_30 Beta") '(6 9 30 -2))) + (should (equal (version-to-list "6_9_30-Beta") '(6 9 30 -2))) + (should (equal (version-to-list "6_9_30.Beta") '(6 9 30 -2))) + (should (equal (version-to-list "6_9_30Beta") '(6 9 30 -2))) + + (should (equal + (error-message-string (should-error (version-to-list "1_0__7_5"))) + "Invalid version syntax: `1_0__7_5'")) + (should (equal + (error-message-string (should-error (version-to-list "1_0prepre2"))) + "Invalid version syntax: `1_0prepre2'")) + (should (equal + (error-message-string (should-error (version-to-list "22.8X3"))) + "Invalid version syntax: `22.8X3'")) + (should (equal + (error-message-string (should-error (version-to-list "beta22_8alpha3"))) + "Invalid version syntax: `beta22_8alpha3' (must start with a number)")))) + (provide 'subr-tests) ;;; subr-tests.el ends here diff --git a/test/manual/etags/CTAGS.good b/test/manual/etags/CTAGS.good index 9291d346769..245f6703adf 100644 --- a/test/manual/etags/CTAGS.good +++ b/test/manual/etags/CTAGS.good @@ -46,6 +46,7 @@ $user_comment_lc php-src/lce_functions.php 115 ($string,$flag,@string,@temp,@last perl-src/yagrip.pl 40 (a-forth-constant forth-src/test-forth.fth /^constant (a-forth-constant$/ (another-forth-word forth-src/test-forth.fth /^: (another-forth-word) ( -- )$/ ++ ruby-src/test.rb /^ def +(y)$/ + tex-src/texinfo.tex /^\\def+{{\\tt \\char 43}}$/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ @@ -177,6 +178,9 @@ $user_comment_lc php-src/lce_functions.php 115 /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ +<< ruby-src/test.rb /^ def <<(y)$/ +<= ruby-src/test.rb /^ def <=(y)$/ +<=> ruby-src/test.rb /^ def <=>(y)$/ = tex-src/texinfo.tex /^\\global\\let\\section = \\numberedsec$/ = tex-src/texinfo.tex /^\\global\\let\\subsection = \\numberedsubsec$/ = tex-src/texinfo.tex /^\\global\\let\\subsubsection = \\numberedsubsubsec$/ @@ -191,6 +195,8 @@ $user_comment_lc php-src/lce_functions.php 115 = tex-src/texinfo.tex /^\\global\\let\\subsubsection = \\numberedsubsubsec$/ = tex-src/texinfo.tex /^\\global\\def={{\\tt \\char 61}}}$/ =/f ada-src/etags-test-for.ada /^ function "=" (L, R : System.Address) return Boo/ +== ruby-src/test.rb /^ def ==(y)$/ +=== ruby-src/test.rb /^ def ===(y)$/ =\indexdummyfont tex-src/texinfo.tex /^\\let\\cite=\\indexdummyfont$/ =\relax tex-src/texinfo.tex /^\\let\\chapter=\\relax$/ =\relax tex-src/texinfo.tex /^\\let\\section=\\relax$/ @@ -220,6 +226,7 @@ A cp-src/c.C 73 A cp-src/c.C 117 A cp-src/fail.C 7 A cp-src/fail.C 23 +A ruby-src/test1.ruby /^class A$/ ADDRESS c-src/emacs/src/gmalloc.c /^#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZ/ ALIGNOF_STRUCT_LISP_VECTOR c-src/emacs/src/lisp.h 1378 ALLOCATED_BEFORE_DUMPING c-src/emacs/src/gmalloc.c /^#define ALLOCATED_BEFORE_DUMPING(P) \\$/ @@ -306,6 +313,7 @@ BUFFERP c-src/emacs/src/lisp.h /^BUFFERP (Lisp_Object a)$/ BUFFERSIZE objc-src/Subprocess.h 43 BUFFER_OBJFWDP c-src/emacs/src/lisp.h /^BUFFER_OBJFWDP (union Lisp_Fwd *a)$/ BYTE_MARK_STACK c-src/emacs/src/lisp.h 3181 +Bar lua-src/test.lua /^function Square.something:Bar ()$/ Bar perl-src/kai-test.pl /^package Bar;$/ Bar::f4 perl-src/kai-test.pl /^sub Bar::f4 {$/ Bar::f5 perl-src/kai-test.pl /^sub f5 {$/ @@ -425,9 +433,12 @@ C_entries c-src/etags.c /^C_entries (int c_ext, FILE *inf)$/ C_stab_entry c-src/etags.c 2271 C_symtype c-src/etags.c /^C_symtype (char *str, int len, int c_ext)$/ ChangeFileType pas-src/common.pas /^function ChangeFileType; (*(FileName : NameString;/ +Circle.getPos lua-src/test.lua /^function Circle.getPos ()$/ Cjava_entries c-src/etags.c /^Cjava_entries (FILE *inf)$/ Cjava_help c-src/etags.c 551 Cjava_suffixes c-src/etags.c 549 +ClassExample ruby-src/test.rb /^ class ClassExample$/ +ClassExample.singleton_class_method ruby-src/test.rb /^ def ClassExample.singleton_class_method$/ Clear/p ada-src/2ataspri.adb /^ procedure Clear (Cell : in out TAS_Cell) is$/ Clear/p ada-src/2ataspri.ads /^ procedure Clear (Cell : in out TAS_Cell)/ Cobol_help c-src/etags.c 558 @@ -458,6 +469,7 @@ Create_LL_Task/p ada-src/2ataspri.adb /^ procedure Create_LL_Task$/ Create_LL_Task/p ada-src/2ataspri.ads /^ procedure Create_LL_Task$/ Cstar_entries c-src/etags.c /^Cstar_entries (FILE *inf)$/ Cstar_suffixes c-src/etags.c 562 +Cube.data.getFoo lua-src/test.lua /^function Cube.data.getFoo ()$/ D cp-src/fail.C 41 D cp-src/fail.C /^ D() : ::A::T2::T(97), x(1066) {}$/ DAEMON_RUNNING c-src/emacs/src/lisp.h 4258 @@ -926,6 +938,8 @@ Mconway.cpp cp-src/conway.cpp /^void main(void)$/ Metags c-src/etags.c /^main (int argc, char **argv)$/ Mfail cp-src/fail.C /^main()$/ Mkai-test.pl perl-src/kai-test.pl /^package main;$/ +ModuleExample ruby-src/test.rb /^module ModuleExample$/ +ModuleExample.singleton_module_method ruby-src/test.rb /^ def ModuleExample.singleton_module_method$/ More_Lisp_Bits c-src/emacs/src/lisp.h 801 MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/ MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/ @@ -1193,6 +1207,7 @@ Range cp-src/Range.h /^ Range (double b, double l, double i)$/ ReadVacation cp-src/functions.cpp /^void ReadVacation ( char *filename ) {$/ Read_Lock/p ada-src/2ataspri.adb /^ procedure Read_Lock (L : in out Lock; Ceiling_V/ Read_Lock/p ada-src/2ataspri.ads /^ procedure Read_Lock (L : in out Lock; Ceiling_V/ +Rectangle.getPos lua-src/test.lua /^function Rectangle.getPos ()$/ ReleaseNameString pas-src/common.pas /^procedure ReleaseNameString; (* (var NSP: NameStri/ RemoveLayer lua-src/allegro.lua /^function RemoveLayer ()$/ RemoveUnderlineControl pas-src/common.pas /^function RemoveUnderlineControl; (*($/ @@ -1309,6 +1324,7 @@ SimpleCalc objcpp-src/SimpleCalc.H /^@interface SimpleCalc:Object$/ SkipBlanks pas-src/common.pas /^function SkipBlanks; (*($/ SkipChars pas-src/common.pas /^function SkipChars; (*($/ SkipSpaces pas-src/common.pas /^procedure SkipSpaces; (* (Str : NameString; var I / +Square.something:Bar lua-src/test.lua /^function Square.something:Bar ()$/ StartDay cp-src/functions.cpp /^Date StartDay(Date a,int days){\/\/Function to calcu/ StripPath pas-src/common.pas /^function StripPath; (*($/ SubString pas-src/common.pas /^function SubString; (*($/ @@ -1647,6 +1663,8 @@ Yacc_entries c-src/etags.c /^Yacc_entries (FILE *inf)$/ Yacc_help c-src/etags.c 693 Yacc_suffixes c-src/etags.c 691 Z c-src/h.h 100 +[] ruby-src/test.rb /^ def [](y)$/ +[]= ruby-src/test.rb /^ def []=(y, val)$/ \ tex-src/texinfo.tex /^\\def\\ {{\\fontdimen2\\font=\\tclosesave{} }}%$/ \ tex-src/texinfo.tex /^\\gdef\\sepspaces{\\def {\\ }}}$/ \' tex-src/texinfo.tex /^\\def\\'{{'}}$/ @@ -2353,6 +2371,7 @@ _malloc_thread_enabled_p c-src/emacs/src/gmalloc.c 519 _realloc c-src/emacs/src/gmalloc.c /^_realloc (void *ptr, size_t size)$/ _realloc_internal c-src/emacs/src/gmalloc.c /^_realloc_internal (void *ptr, size_t size)$/ _realloc_internal_nolock c-src/emacs/src/gmalloc.c /^_realloc_internal_nolock (void *ptr, size_t size)$/ +` ruby-src/test.rb /^ def `(command)$/ a c.c 152 a c.c 180 a c.c /^a()$/ @@ -2360,6 +2379,7 @@ a c.c /^a ()$/ a c-src/h.h 40 a c-src/h.h 103 a cp-src/c.C 132 +a ruby-src/test1.ruby /^ def a()$/ a-forth-constant! forth-src/test-forth.fth /^99 constant a-forth-constant!$/ a-forth-value? forth-src/test-forth.fth /^55 value a-forth-value?$/ a-forth-word forth-src/test-forth.fth /^: a-forth-word ( a b c -- a*b+c ) + * ;$/ @@ -2484,6 +2504,7 @@ b c-src/h.h 41 b c-src/h.h 103 b c-src/h.h 104 b cp-src/c.C 132 +b ruby-src/test1.ruby /^ def b()$/ backslash=0 tex-src/texinfo.tex /^\\let\\indexbackslash=0 %overridden during \\printin/ bar c-src/c.c /^void bar() {while(0) {}}$/ bar c.c 143 @@ -2599,6 +2620,10 @@ childDidExit objc-src/Subprocess.m /^- childDidExit$/ chunks_free c-src/emacs/src/gmalloc.c 313 chunks_used c-src/emacs/src/gmalloc.c 311 cjava c-src/etags.c 2936 +class_method ruby-src/test.rb /^ def class_method$/ +class_method_equals= ruby-src/test.rb /^ def class_method_equals=$/ +class_method_exclamation! ruby-src/test.rb /^ def class_method_exclamation!$/ +class_method_question? ruby-src/test.rb /^ def class_method_question?$/ classifyLine php-src/lce_functions.php /^ function classifyLine($line)$/ clear cp-src/conway.hpp /^ void clear(void) { alive = 0; }$/ clear-abbrev-table c-src/abbrev.c /^DEFUN ("clear-abbrev-table", Fclear_abbrev_table, / @@ -2988,8 +3013,11 @@ generic_object cp-src/clheir.cpp /^generic_object::generic_object(void)$/ generic_object cp-src/clheir.hpp 13 getArchs objc-src/PackInsp.m /^-(void)getArchs$/ getDomainNames php-src/lce_functions.php /^ function getDomainNames()$/ +getFoo lua-src/test.lua /^function Cube.data.getFoo ()$/ getPOReader php-src/lce_functions.php /^ function &getPOReader($domain)$/ getPath objc-src/PackInsp.m /^-(const char *)getPath:(char *)buf forType:(const / +getPos lua-src/test.lua /^function Rectangle.getPos ()$/ +getPos lua-src/test.lua /^function Circle.getPos ()$/ getTextDomains php-src/lce_functions.php /^ function getTextDomains($lines)$/ get_compressor_from_suffix c-src/etags.c /^get_compressor_from_suffix (char *file, char **ext/ get_contiguous_space c-src/emacs/src/gmalloc.c /^get_contiguous_space (ptrdiff_t size, void *positi/ @@ -3397,6 +3425,8 @@ mcCSC cp-src/c.C 6 mcheck c-src/emacs/src/gmalloc.c /^mcheck (void (*func) (enum mcheck_status))$/ mcheck_status c-src/emacs/src/gmalloc.c 283 mcheck_used c-src/emacs/src/gmalloc.c 2012 +me22b lua-src/test.lua /^ local function test.me22b (one)$/ +me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ memalign c-src/emacs/src/gmalloc.c /^memalign (size_t alignment, size_t size)$/ member prol-src/natded.prolog /^member(X,[X|_]).$/ memclear c-src/emacs/src/lisp.h /^memclear (void *p, ptrdiff_t nbytes)$/ @@ -3420,6 +3450,7 @@ miti html-src/softwarelibero.html /^Sfatiamo alcuni miti$/ modifier_names c-src/emacs/src/keyboard.c 6319 modifier_symbols c-src/emacs/src/keyboard.c 6327 modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/ +module_method ruby-src/test.rb /^ def module_method$/ more_aligned_int c.c 165 morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/ morecore_recursing c-src/emacs/src/gmalloc.c 604 @@ -4180,6 +4211,8 @@ test c-src/emacs/src/lisp.h 1871 test cp-src/c.C 86 test erl-src/gs_dialog.erl /^test() ->$/ test php-src/ptest.php /^test $/ +test.me22b lua-src/test.lua /^ local function test.me22b (one)$/ +test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ test_undefined c-src/emacs/src/keyboard.c /^test_undefined (Lisp_Object binding)$/ texttreelist prol-src/natded.prolog /^texttreelist([]).$/ this c-src/a/b/b.c 1 diff --git a/test/manual/etags/ETAGS.good_1 b/test/manual/etags/ETAGS.good_1 index e1e0daf4872..2ae4ec41256 100644 --- a/test/manual/etags/ETAGS.good_1 +++ b/test/manual/etags/ETAGS.good_1 @@ -2084,17 +2084,17 @@ void agent::move(move53,1353 cp-src/clheir.hpp,423 class generic_object13,520 - virtual void compute_next_state(21,842 - virtual void step(22,888 -const int max_num_directions 31,1219 -class location:location33,1289 - location(43,1642 -class irregular_location:irregular_location47,1686 - irregular_location(51,1762 -class discrete_location:discrete_location56,1889 - discrete_location(62,2044 - void assign_neighbor(66,2184 -class agent:agent75,2508 + virtual void compute_next_state(21,843 + virtual void step(22,889 +const int max_num_directions 31,1220 +class location:location33,1290 + location(43,1643 +class irregular_location:irregular_location47,1687 + irregular_location(51,1763 +class discrete_location:discrete_location56,1890 + discrete_location(62,2045 + void assign_neighbor(66,2185 +class agent:agent75,2509 cp-src/fail.C,294 struct A 7,263 @@ -2218,28 +2218,28 @@ el-src/emacs/lisp/progmodes/etags.el,5069 (defun next-file 1685,67976 (defvar tags-loop-operate 1760,70890 (defvar tags-loop-scan1763,70984 -(defun tags-loop-eval 1771,71314 -(defun tags-loop-continue 1782,71643 -(defun tags-search 1850,73949 -(defun tags-query-replace 1871,74775 -(defun tags-complete-tags-table-file 1896,75999 -(defun list-tags 1906,76378 -(defun tags-apropos 1934,77331 -(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78157 -(defun select-tags-table 1964,78396 -(defvar select-tags-table-mode-map 2019,80523 -(define-derived-mode select-tags-table-mode 2030,80906 -(defun select-tags-table-select 2034,81090 -(defun select-tags-table-quit 2043,81456 -(defun complete-tag 2049,81611 -(defconst etags--xref-limit 2074,82552 -(defvar etags-xref-find-definitions-tag-order 2076,82587 -(defun etags-xref-find 2082,82877 -(defun etags--xref-find-definitions 2096,83406 -(defclass xref-etags-location 2129,85121 -(defun xref-make-etags-location 2135,85344 -(cl-defmethod xref-location-marker 2139,85499 -(cl-defmethod xref-location-line 2146,85743 +(defun tags-loop-eval 1771,71313 +(defun tags-loop-continue 1782,71642 +(defun tags-search 1850,73948 +(defun tags-query-replace 1871,74774 +(defun tags-complete-tags-table-file 1896,75998 +(defun list-tags 1906,76377 +(defun tags-apropos 1934,77330 +(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78156 +(defun select-tags-table 1964,78395 +(defvar select-tags-table-mode-map 2019,80522 +(define-derived-mode select-tags-table-mode 2030,80905 +(defun select-tags-table-select 2034,81089 +(defun select-tags-table-quit 2043,81455 +(defun complete-tag 2049,81610 +(defconst etags--xref-limit 2074,82551 +(defvar etags-xref-find-definitions-tag-order 2076,82586 +(defun etags-xref-find 2082,82876 +(defun etags--xref-find-definitions 2096,83405 +(defclass xref-etags-location 2129,85120 +(defun xref-make-etags-location 2135,85343 +(cl-defmethod xref-location-marker 2139,85498 +(cl-defmethod xref-location-line 2146,85742 erl-src/gs_dialog.erl,98 -define(VERSION2,32 @@ -2336,49 +2336,63 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 +lua-src/test.lua,442 +function Rectangle.getPos 2,15 +function Rectangle.getPos getPos2,15 +function Circle.getPos 6,61 +function Circle.getPos getPos6,61 +function Cube.data.getFoo 10,102 +function Cube.data.getFoo getFoo10,102 +function Square.something:Bar 14,148 +function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 + make-src/Makefile,1133 LATEST=1,0 -NONSRCS=35,1578 -CPPFLAGS=49,2191 -LDFLAGS=50,2260 -FASTCFLAGS=55,2531 -FILTER=58,2642 - @-$($72,3064 - @-$($73,3113 - @-$($74,3177 - @-$($75,3223 - @-$($76,3291 - @-$($77,3383 - @$(81,3466 - @$(82,3514 - @$(83,3577 - @$(84,3622 - @$(85,3689 - @$(86,3780 -${CHECKOBJS}: CFLAGS=88,3806 - @env CHECKEROPTS=92,3922 - @$(98,4094 - @$(106,4250 - @$(110,4374 - @$(114,4500 - @for i in $(SRCS); do echo $$i;140,5315 - $(160,6053 - $(163,6114 - $(166,6177 - $(169,6228 - $(172,6317 - sdiff --suppress-common-lines --width=width186,6614 - sdiff --suppress-common-lines --width=width189,6703 - sdiff --suppress-common-lines --width=width192,6791 - sdiff --suppress-common-lines --width=width195,6880 - TEXTAGS=204,7122 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7122 - ${RUN} etags12 --members -o $@ --regex=regex207,7239 - ${RUN} ./ctags -o $@ --regex=regex213,7388 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7464 - TEXTAGS=219,7583 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7583 - ${RUN} ./extags -e --regex-c=c222,7710 +NONSRCS=35,1577 +CPPFLAGS=49,2190 +LDFLAGS=50,2259 +FASTCFLAGS=55,2530 +FILTER=58,2641 + @-$($72,3063 + @-$($73,3112 + @-$($74,3176 + @-$($75,3222 + @-$($76,3290 + @-$($77,3382 + @$(81,3465 + @$(82,3513 + @$(83,3576 + @$(84,3621 + @$(85,3688 + @$(86,3779 +${CHECKOBJS}: CFLAGS=88,3805 + @env CHECKEROPTS=92,3921 + @$(98,4093 + @$(106,4249 + @$(110,4373 + @$(114,4499 + @for i in $(SRCS); do echo $$i;140,5320 + $(160,6058 + $(163,6119 + $(166,6182 + $(169,6233 + $(172,6322 + sdiff --suppress-common-lines --width=width186,6619 + sdiff --suppress-common-lines --width=width189,6708 + sdiff --suppress-common-lines --width=width192,6796 + sdiff --suppress-common-lines --width=width195,6885 + TEXTAGS=204,7127 + TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 + ${RUN} etags12 --members -o $@ --regex=regex207,7244 + ${RUN} ./ctags -o $@ --regex=regex213,7393 + ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 + TEXTAGS=219,7588 + TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 + ${RUN} ./extags -e --regex-c=c222,7715 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -2963,6 +2977,31 @@ class Configure(760,24879 def save(797,26022 def nosave(807,26310 +ruby-src/test.rb,594 +module ModuleExample1,0 + class ClassExample2,21 + def class_method3,44 + def ClassExample.singleton_class_method6,116 + def class_method_exclamation!9,221 + def class_method_question?12,319 + def class_method_equals=class_method_equals=15,411 + def `(18,499 + def +(21,589 + def [](24,637 + def []=([]=27,687 + def <<(30,749 + def ==(==33,799 + def <=(<=36,869 + def <=>(<=>39,940 + def ===(===42,987 + def module_method46,1048 + def ModuleExample.singleton_module_method49,1110 + +ruby-src/test1.ruby,37 +class A1,0 + def a(2,8 + def b(5,38 + tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 \section{blah}blah8,139 diff --git a/test/manual/etags/ETAGS.good_2 b/test/manual/etags/ETAGS.good_2 index 8b0742241c7..3ec5b21d384 100644 --- a/test/manual/etags/ETAGS.good_2 +++ b/test/manual/etags/ETAGS.good_2 @@ -2642,24 +2642,24 @@ extern void step_everybody(11,485 class generic_object13,520 generic_object(17,582 ~generic_object(19,724 - virtual void compute_next_state(21,842 - virtual void step(22,888 -const int max_num_directions 31,1219 -class location:location33,1289 - location(43,1642 - ~location(44,1661 -class irregular_location:irregular_location47,1686 - irregular_location(51,1762 - ~irregular_location(53,1854 -class discrete_location:discrete_location56,1889 - void clear_neighbors(60,2004 - discrete_location(62,2044 - ~discrete_location(65,2154 - void assign_neighbor(66,2184 -class agent:agent75,2508 - agent(79,2578 - ~agent(80,2591 - void move(81,2605 + virtual void compute_next_state(21,843 + virtual void step(22,889 +const int max_num_directions 31,1220 +class location:location33,1290 + location(43,1643 + ~location(44,1662 +class irregular_location:irregular_location47,1687 + irregular_location(51,1763 + ~irregular_location(53,1855 +class discrete_location:discrete_location56,1890 + void clear_neighbors(60,2005 + discrete_location(62,2045 + ~discrete_location(65,2155 + void assign_neighbor(66,2185 +class agent:agent75,2509 + agent(79,2579 + ~agent(80,2592 + void move(81,2606 cp-src/fail.C,315 struct A 7,263 @@ -2787,28 +2787,28 @@ el-src/emacs/lisp/progmodes/etags.el,5188 (defun next-file 1685,67976 (defvar tags-loop-operate 1760,70890 (defvar tags-loop-scan1763,70984 -(defun tags-loop-eval 1771,71314 -(defun tags-loop-continue 1782,71643 -(defun tags-search 1850,73949 -(defun tags-query-replace 1871,74775 -(defun tags-complete-tags-table-file 1896,75999 -(defun list-tags 1906,76378 -(defun tags-apropos 1934,77331 -(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78157 -(defun select-tags-table 1964,78396 -(defvar select-tags-table-mode-map 2019,80523 -(define-derived-mode select-tags-table-mode 2030,80906 -(defun select-tags-table-select 2034,81090 -(defun select-tags-table-quit 2043,81456 -(defun complete-tag 2049,81611 -(defconst etags--xref-limit 2074,82552 -(defvar etags-xref-find-definitions-tag-order 2076,82587 -(defun etags-xref-find 2082,82877 -(defun etags--xref-find-definitions 2096,83406 -(defclass xref-etags-location 2129,85121 -(defun xref-make-etags-location 2135,85344 -(cl-defmethod xref-location-marker 2139,85499 -(cl-defmethod xref-location-line 2146,85743 +(defun tags-loop-eval 1771,71313 +(defun tags-loop-continue 1782,71642 +(defun tags-search 1850,73948 +(defun tags-query-replace 1871,74774 +(defun tags-complete-tags-table-file 1896,75998 +(defun list-tags 1906,76377 +(defun tags-apropos 1934,77330 +(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78156 +(defun select-tags-table 1964,78395 +(defvar select-tags-table-mode-map 2019,80522 +(define-derived-mode select-tags-table-mode 2030,80905 +(defun select-tags-table-select 2034,81089 +(defun select-tags-table-quit 2043,81455 +(defun complete-tag 2049,81610 +(defconst etags--xref-limit 2074,82551 +(defvar etags-xref-find-definitions-tag-order 2076,82586 +(defun etags-xref-find 2082,82876 +(defun etags--xref-find-definitions 2096,83405 +(defclass xref-etags-location 2129,85120 +(defun xref-make-etags-location 2135,85343 +(cl-defmethod xref-location-marker 2139,85498 +(cl-defmethod xref-location-line 2146,85742 erl-src/gs_dialog.erl,98 -define(VERSION2,32 @@ -2905,50 +2905,64 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 +lua-src/test.lua,442 +function Rectangle.getPos 2,15 +function Rectangle.getPos getPos2,15 +function Circle.getPos 6,61 +function Circle.getPos getPos6,61 +function Cube.data.getFoo 10,102 +function Cube.data.getFoo getFoo10,102 +function Square.something:Bar 14,148 +function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 + make-src/Makefile,1156 LATEST=1,0 -NONSRCS=35,1578 -CPPFLAGS=49,2191 -LDFLAGS=50,2260 -FASTCFLAGS=55,2531 -FILTER=58,2642 - @-$($72,3064 - @-$($73,3113 - @-$($74,3177 - @-$($75,3223 - @-$($76,3291 - @-$($77,3383 - @$(81,3466 - @$(82,3514 - @$(83,3577 - @$(84,3622 - @$(85,3689 - @$(86,3780 -${CHECKOBJS}: CFLAGS=88,3806 - @env CHECKEROPTS=92,3922 - @$(98,4094 - @$(106,4250 - @$(110,4374 - @$(114,4500 - @for i in $(140,5315 - @for i in $(SRCS); do echo $$i;140,5315 - $(160,6053 - $(163,6114 - $(166,6177 - $(169,6228 - $(172,6317 - sdiff --suppress-common-lines --width=width186,6614 - sdiff --suppress-common-lines --width=width189,6703 - sdiff --suppress-common-lines --width=width192,6791 - sdiff --suppress-common-lines --width=width195,6880 - TEXTAGS=204,7122 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7122 - ${RUN} etags12 --members -o $@ --regex=regex207,7239 - ${RUN} ./ctags -o $@ --regex=regex213,7388 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7464 - TEXTAGS=219,7583 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7583 - ${RUN} ./extags -e --regex-c=c222,7710 +NONSRCS=35,1577 +CPPFLAGS=49,2190 +LDFLAGS=50,2259 +FASTCFLAGS=55,2530 +FILTER=58,2641 + @-$($72,3063 + @-$($73,3112 + @-$($74,3176 + @-$($75,3222 + @-$($76,3290 + @-$($77,3382 + @$(81,3465 + @$(82,3513 + @$(83,3576 + @$(84,3621 + @$(85,3688 + @$(86,3779 +${CHECKOBJS}: CFLAGS=88,3805 + @env CHECKEROPTS=92,3921 + @$(98,4093 + @$(106,4249 + @$(110,4373 + @$(114,4499 + @for i in $(140,5320 + @for i in $(SRCS); do echo $$i;140,5320 + $(160,6058 + $(163,6119 + $(166,6182 + $(169,6233 + $(172,6322 + sdiff --suppress-common-lines --width=width186,6619 + sdiff --suppress-common-lines --width=width189,6708 + sdiff --suppress-common-lines --width=width192,6796 + sdiff --suppress-common-lines --width=width195,6885 + TEXTAGS=204,7127 + TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 + ${RUN} etags12 --members -o $@ --regex=regex207,7244 + ${RUN} ./ctags -o $@ --regex=regex213,7393 + ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 + TEXTAGS=219,7588 + TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 + ${RUN} ./extags -e --regex-c=c222,7715 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3534,6 +3548,31 @@ class Configure(760,24879 def save(797,26022 def nosave(807,26310 +ruby-src/test.rb,594 +module ModuleExample1,0 + class ClassExample2,21 + def class_method3,44 + def ClassExample.singleton_class_method6,116 + def class_method_exclamation!9,221 + def class_method_question?12,319 + def class_method_equals=class_method_equals=15,411 + def `(18,499 + def +(21,589 + def [](24,637 + def []=([]=27,687 + def <<(30,749 + def ==(==33,799 + def <=(<=36,869 + def <=>(<=>39,940 + def ===(===42,987 + def module_method46,1048 + def ModuleExample.singleton_module_method49,1110 + +ruby-src/test1.ruby,37 +class A1,0 + def a(2,8 + def b(5,38 + tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 \section{blah}blah8,139 diff --git a/test/manual/etags/ETAGS.good_3 b/test/manual/etags/ETAGS.good_3 index 37eaafbab61..43b84eed5d2 100644 --- a/test/manual/etags/ETAGS.good_3 +++ b/test/manual/etags/ETAGS.good_3 @@ -2391,25 +2391,25 @@ void agent::move(move53,1353 cp-src/clheir.hpp,682 class generic_object13,520 int where_in_registry;15,547 - virtual void compute_next_state(21,842 - virtual void step(22,888 -const int max_num_directions 31,1219 -class location:location33,1289 - location(43,1642 -class irregular_location:irregular_location47,1686 - double x,49,1734 - double x, y,49,1734 - double x, y, z;49,1734 - irregular_location(51,1762 -class discrete_location:discrete_location56,1889 - int x,58,1936 - int x, y,58,1936 - int x, y, z;58,1936 - class location *neighbors[neighbors59,1953 - discrete_location(62,2044 - void assign_neighbor(66,2184 -class agent:agent75,2508 - location *where;where77,2549 + virtual void compute_next_state(21,843 + virtual void step(22,889 +const int max_num_directions 31,1220 +class location:location33,1290 + location(43,1643 +class irregular_location:irregular_location47,1687 + double x,49,1735 + double x, y,49,1735 + double x, y, z;49,1735 + irregular_location(51,1763 +class discrete_location:discrete_location56,1890 + int x,58,1937 + int x, y,58,1937 + int x, y, z;58,1937 + class location *neighbors[neighbors59,1954 + discrete_location(62,2045 + void assign_neighbor(66,2185 +class agent:agent75,2509 + location *where;where77,2550 cp-src/fail.C,330 struct A 7,263 @@ -2535,28 +2535,28 @@ el-src/emacs/lisp/progmodes/etags.el,5069 (defun next-file 1685,67976 (defvar tags-loop-operate 1760,70890 (defvar tags-loop-scan1763,70984 -(defun tags-loop-eval 1771,71314 -(defun tags-loop-continue 1782,71643 -(defun tags-search 1850,73949 -(defun tags-query-replace 1871,74775 -(defun tags-complete-tags-table-file 1896,75999 -(defun list-tags 1906,76378 -(defun tags-apropos 1934,77331 -(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78157 -(defun select-tags-table 1964,78396 -(defvar select-tags-table-mode-map 2019,80523 -(define-derived-mode select-tags-table-mode 2030,80906 -(defun select-tags-table-select 2034,81090 -(defun select-tags-table-quit 2043,81456 -(defun complete-tag 2049,81611 -(defconst etags--xref-limit 2074,82552 -(defvar etags-xref-find-definitions-tag-order 2076,82587 -(defun etags-xref-find 2082,82877 -(defun etags--xref-find-definitions 2096,83406 -(defclass xref-etags-location 2129,85121 -(defun xref-make-etags-location 2135,85344 -(cl-defmethod xref-location-marker 2139,85499 -(cl-defmethod xref-location-line 2146,85743 +(defun tags-loop-eval 1771,71313 +(defun tags-loop-continue 1782,71642 +(defun tags-search 1850,73948 +(defun tags-query-replace 1871,74774 +(defun tags-complete-tags-table-file 1896,75998 +(defun list-tags 1906,76377 +(defun tags-apropos 1934,77330 +(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78156 +(defun select-tags-table 1964,78395 +(defvar select-tags-table-mode-map 2019,80522 +(define-derived-mode select-tags-table-mode 2030,80905 +(defun select-tags-table-select 2034,81089 +(defun select-tags-table-quit 2043,81455 +(defun complete-tag 2049,81610 +(defconst etags--xref-limit 2074,82551 +(defvar etags-xref-find-definitions-tag-order 2076,82586 +(defun etags-xref-find 2082,82876 +(defun etags--xref-find-definitions 2096,83405 +(defclass xref-etags-location 2129,85120 +(defun xref-make-etags-location 2135,85343 +(cl-defmethod xref-location-marker 2139,85498 +(cl-defmethod xref-location-line 2146,85742 erl-src/gs_dialog.erl,98 -define(VERSION2,32 @@ -2653,49 +2653,63 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 +lua-src/test.lua,442 +function Rectangle.getPos 2,15 +function Rectangle.getPos getPos2,15 +function Circle.getPos 6,61 +function Circle.getPos getPos6,61 +function Cube.data.getFoo 10,102 +function Cube.data.getFoo getFoo10,102 +function Square.something:Bar 14,148 +function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 + make-src/Makefile,1133 LATEST=1,0 -NONSRCS=35,1578 -CPPFLAGS=49,2191 -LDFLAGS=50,2260 -FASTCFLAGS=55,2531 -FILTER=58,2642 - @-$($72,3064 - @-$($73,3113 - @-$($74,3177 - @-$($75,3223 - @-$($76,3291 - @-$($77,3383 - @$(81,3466 - @$(82,3514 - @$(83,3577 - @$(84,3622 - @$(85,3689 - @$(86,3780 -${CHECKOBJS}: CFLAGS=88,3806 - @env CHECKEROPTS=92,3922 - @$(98,4094 - @$(106,4250 - @$(110,4374 - @$(114,4500 - @for i in $(SRCS); do echo $$i;140,5315 - $(160,6053 - $(163,6114 - $(166,6177 - $(169,6228 - $(172,6317 - sdiff --suppress-common-lines --width=width186,6614 - sdiff --suppress-common-lines --width=width189,6703 - sdiff --suppress-common-lines --width=width192,6791 - sdiff --suppress-common-lines --width=width195,6880 - TEXTAGS=204,7122 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7122 - ${RUN} etags12 --members -o $@ --regex=regex207,7239 - ${RUN} ./ctags -o $@ --regex=regex213,7388 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7464 - TEXTAGS=219,7583 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7583 - ${RUN} ./extags -e --regex-c=c222,7710 +NONSRCS=35,1577 +CPPFLAGS=49,2190 +LDFLAGS=50,2259 +FASTCFLAGS=55,2530 +FILTER=58,2641 + @-$($72,3063 + @-$($73,3112 + @-$($74,3176 + @-$($75,3222 + @-$($76,3290 + @-$($77,3382 + @$(81,3465 + @$(82,3513 + @$(83,3576 + @$(84,3621 + @$(85,3688 + @$(86,3779 +${CHECKOBJS}: CFLAGS=88,3805 + @env CHECKEROPTS=92,3921 + @$(98,4093 + @$(106,4249 + @$(110,4373 + @$(114,4499 + @for i in $(SRCS); do echo $$i;140,5320 + $(160,6058 + $(163,6119 + $(166,6182 + $(169,6233 + $(172,6322 + sdiff --suppress-common-lines --width=width186,6619 + sdiff --suppress-common-lines --width=width189,6708 + sdiff --suppress-common-lines --width=width192,6796 + sdiff --suppress-common-lines --width=width195,6885 + TEXTAGS=204,7127 + TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 + ${RUN} etags12 --members -o $@ --regex=regex207,7244 + ${RUN} ./ctags -o $@ --regex=regex213,7393 + ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 + TEXTAGS=219,7588 + TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 + ${RUN} ./extags -e --regex-c=c222,7715 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3307,6 +3321,31 @@ class Configure(760,24879 def save(797,26022 def nosave(807,26310 +ruby-src/test.rb,594 +module ModuleExample1,0 + class ClassExample2,21 + def class_method3,44 + def ClassExample.singleton_class_method6,116 + def class_method_exclamation!9,221 + def class_method_question?12,319 + def class_method_equals=class_method_equals=15,411 + def `(18,499 + def +(21,589 + def [](24,637 + def []=([]=27,687 + def <<(30,749 + def ==(==33,799 + def <=(<=36,869 + def <=>(<=>39,940 + def ===(===42,987 + def module_method46,1048 + def ModuleExample.singleton_module_method49,1110 + +ruby-src/test1.ruby,37 +class A1,0 + def a(2,8 + def b(5,38 + tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 \section{blah}blah8,139 diff --git a/test/manual/etags/ETAGS.good_4 b/test/manual/etags/ETAGS.good_4 index 2b631d1a165..434fe13cbd4 100644 --- a/test/manual/etags/ETAGS.good_4 +++ b/test/manual/etags/ETAGS.good_4 @@ -2248,17 +2248,17 @@ void agent::move(move53,1353 cp-src/clheir.hpp,423 class generic_object13,520 - virtual void compute_next_state(21,842 - virtual void step(22,888 -const int max_num_directions 31,1219 -class location:location33,1289 - location(43,1642 -class irregular_location:irregular_location47,1686 - irregular_location(51,1762 -class discrete_location:discrete_location56,1889 - discrete_location(62,2044 - void assign_neighbor(66,2184 -class agent:agent75,2508 + virtual void compute_next_state(21,843 + virtual void step(22,889 +const int max_num_directions 31,1220 +class location:location33,1290 + location(43,1643 +class irregular_location:irregular_location47,1687 + irregular_location(51,1763 +class discrete_location:discrete_location56,1890 + discrete_location(62,2045 + void assign_neighbor(66,2185 +class agent:agent75,2509 cp-src/fail.C,294 struct A 7,263 @@ -2382,28 +2382,28 @@ el-src/emacs/lisp/progmodes/etags.el,5069 (defun next-file 1685,67976 (defvar tags-loop-operate 1760,70890 (defvar tags-loop-scan1763,70984 -(defun tags-loop-eval 1771,71314 -(defun tags-loop-continue 1782,71643 -(defun tags-search 1850,73949 -(defun tags-query-replace 1871,74775 -(defun tags-complete-tags-table-file 1896,75999 -(defun list-tags 1906,76378 -(defun tags-apropos 1934,77331 -(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78157 -(defun select-tags-table 1964,78396 -(defvar select-tags-table-mode-map 2019,80523 -(define-derived-mode select-tags-table-mode 2030,80906 -(defun select-tags-table-select 2034,81090 -(defun select-tags-table-quit 2043,81456 -(defun complete-tag 2049,81611 -(defconst etags--xref-limit 2074,82552 -(defvar etags-xref-find-definitions-tag-order 2076,82587 -(defun etags-xref-find 2082,82877 -(defun etags--xref-find-definitions 2096,83406 -(defclass xref-etags-location 2129,85121 -(defun xref-make-etags-location 2135,85344 -(cl-defmethod xref-location-marker 2139,85499 -(cl-defmethod xref-location-line 2146,85743 +(defun tags-loop-eval 1771,71313 +(defun tags-loop-continue 1782,71642 +(defun tags-search 1850,73948 +(defun tags-query-replace 1871,74774 +(defun tags-complete-tags-table-file 1896,75998 +(defun list-tags 1906,76377 +(defun tags-apropos 1934,77330 +(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78156 +(defun select-tags-table 1964,78395 +(defvar select-tags-table-mode-map 2019,80522 +(define-derived-mode select-tags-table-mode 2030,80905 +(defun select-tags-table-select 2034,81089 +(defun select-tags-table-quit 2043,81455 +(defun complete-tag 2049,81610 +(defconst etags--xref-limit 2074,82551 +(defvar etags-xref-find-definitions-tag-order 2076,82586 +(defun etags-xref-find 2082,82876 +(defun etags--xref-find-definitions 2096,83405 +(defclass xref-etags-location 2129,85120 +(defun xref-make-etags-location 2135,85343 +(cl-defmethod xref-location-marker 2139,85498 +(cl-defmethod xref-location-line 2146,85742 erl-src/gs_dialog.erl,98 -define(VERSION2,32 @@ -2500,49 +2500,63 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 +lua-src/test.lua,442 +function Rectangle.getPos 2,15 +function Rectangle.getPos getPos2,15 +function Circle.getPos 6,61 +function Circle.getPos getPos6,61 +function Cube.data.getFoo 10,102 +function Cube.data.getFoo getFoo10,102 +function Square.something:Bar 14,148 +function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 + make-src/Makefile,1133 LATEST=1,0 -NONSRCS=35,1578 -CPPFLAGS=49,2191 -LDFLAGS=50,2260 -FASTCFLAGS=55,2531 -FILTER=58,2642 - @-$($72,3064 - @-$($73,3113 - @-$($74,3177 - @-$($75,3223 - @-$($76,3291 - @-$($77,3383 - @$(81,3466 - @$(82,3514 - @$(83,3577 - @$(84,3622 - @$(85,3689 - @$(86,3780 -${CHECKOBJS}: CFLAGS=88,3806 - @env CHECKEROPTS=92,3922 - @$(98,4094 - @$(106,4250 - @$(110,4374 - @$(114,4500 - @for i in $(SRCS); do echo $$i;140,5315 - $(160,6053 - $(163,6114 - $(166,6177 - $(169,6228 - $(172,6317 - sdiff --suppress-common-lines --width=width186,6614 - sdiff --suppress-common-lines --width=width189,6703 - sdiff --suppress-common-lines --width=width192,6791 - sdiff --suppress-common-lines --width=width195,6880 - TEXTAGS=204,7122 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7122 - ${RUN} etags12 --members -o $@ --regex=regex207,7239 - ${RUN} ./ctags -o $@ --regex=regex213,7388 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7464 - TEXTAGS=219,7583 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7583 - ${RUN} ./extags -e --regex-c=c222,7710 +NONSRCS=35,1577 +CPPFLAGS=49,2190 +LDFLAGS=50,2259 +FASTCFLAGS=55,2530 +FILTER=58,2641 + @-$($72,3063 + @-$($73,3112 + @-$($74,3176 + @-$($75,3222 + @-$($76,3290 + @-$($77,3382 + @$(81,3465 + @$(82,3513 + @$(83,3576 + @$(84,3621 + @$(85,3688 + @$(86,3779 +${CHECKOBJS}: CFLAGS=88,3805 + @env CHECKEROPTS=92,3921 + @$(98,4093 + @$(106,4249 + @$(110,4373 + @$(114,4499 + @for i in $(SRCS); do echo $$i;140,5320 + $(160,6058 + $(163,6119 + $(166,6182 + $(169,6233 + $(172,6322 + sdiff --suppress-common-lines --width=width186,6619 + sdiff --suppress-common-lines --width=width189,6708 + sdiff --suppress-common-lines --width=width192,6796 + sdiff --suppress-common-lines --width=width195,6885 + TEXTAGS=204,7127 + TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 + ${RUN} etags12 --members -o $@ --regex=regex207,7244 + ${RUN} ./ctags -o $@ --regex=regex213,7393 + ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 + TEXTAGS=219,7588 + TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 + ${RUN} ./extags -e --regex-c=c222,7715 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3127,6 +3141,31 @@ class Configure(760,24879 def save(797,26022 def nosave(807,26310 +ruby-src/test.rb,594 +module ModuleExample1,0 + class ClassExample2,21 + def class_method3,44 + def ClassExample.singleton_class_method6,116 + def class_method_exclamation!9,221 + def class_method_question?12,319 + def class_method_equals=class_method_equals=15,411 + def `(18,499 + def +(21,589 + def [](24,637 + def []=([]=27,687 + def <<(30,749 + def ==(==33,799 + def <=(<=36,869 + def <=>(<=>39,940 + def ===(===42,987 + def module_method46,1048 + def ModuleExample.singleton_module_method49,1110 + +ruby-src/test1.ruby,37 +class A1,0 + def a(2,8 + def b(5,38 + tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 \section{blah}blah8,139 diff --git a/test/manual/etags/ETAGS.good_5 b/test/manual/etags/ETAGS.good_5 index 544a166c6dd..425e2526f35 100644 --- a/test/manual/etags/ETAGS.good_5 +++ b/test/manual/etags/ETAGS.good_5 @@ -3113,32 +3113,32 @@ class generic_object13,520 int where_in_registry;15,547 generic_object(17,582 ~generic_object(19,724 - virtual void compute_next_state(21,842 - virtual void step(22,888 -const int max_num_directions 31,1219 -class location:location33,1289 - location(43,1642 - ~location(44,1661 -class irregular_location:irregular_location47,1686 - double x,49,1734 - double x, y,49,1734 - double x, y, z;49,1734 - irregular_location(51,1762 - ~irregular_location(53,1854 -class discrete_location:discrete_location56,1889 - int x,58,1936 - int x, y,58,1936 - int x, y, z;58,1936 - class location *neighbors[neighbors59,1953 - void clear_neighbors(60,2004 - discrete_location(62,2044 - ~discrete_location(65,2154 - void assign_neighbor(66,2184 -class agent:agent75,2508 - location *where;where77,2549 - agent(79,2578 - ~agent(80,2591 - void move(81,2605 + virtual void compute_next_state(21,843 + virtual void step(22,889 +const int max_num_directions 31,1220 +class location:location33,1290 + location(43,1643 + ~location(44,1662 +class irregular_location:irregular_location47,1687 + double x,49,1735 + double x, y,49,1735 + double x, y, z;49,1735 + irregular_location(51,1763 + ~irregular_location(53,1855 +class discrete_location:discrete_location56,1890 + int x,58,1937 + int x, y,58,1937 + int x, y, z;58,1937 + class location *neighbors[neighbors59,1954 + void clear_neighbors(60,2005 + discrete_location(62,2045 + ~discrete_location(65,2155 + void assign_neighbor(66,2185 +class agent:agent75,2509 + location *where;where77,2550 + agent(79,2579 + ~agent(80,2592 + void move(81,2606 cp-src/fail.C,351 struct A 7,263 @@ -3268,28 +3268,28 @@ el-src/emacs/lisp/progmodes/etags.el,5188 (defun next-file 1685,67976 (defvar tags-loop-operate 1760,70890 (defvar tags-loop-scan1763,70984 -(defun tags-loop-eval 1771,71314 -(defun tags-loop-continue 1782,71643 -(defun tags-search 1850,73949 -(defun tags-query-replace 1871,74775 -(defun tags-complete-tags-table-file 1896,75999 -(defun list-tags 1906,76378 -(defun tags-apropos 1934,77331 -(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78157 -(defun select-tags-table 1964,78396 -(defvar select-tags-table-mode-map 2019,80523 -(define-derived-mode select-tags-table-mode 2030,80906 -(defun select-tags-table-select 2034,81090 -(defun select-tags-table-quit 2043,81456 -(defun complete-tag 2049,81611 -(defconst etags--xref-limit 2074,82552 -(defvar etags-xref-find-definitions-tag-order 2076,82587 -(defun etags-xref-find 2082,82877 -(defun etags--xref-find-definitions 2096,83406 -(defclass xref-etags-location 2129,85121 -(defun xref-make-etags-location 2135,85344 -(cl-defmethod xref-location-marker 2139,85499 -(cl-defmethod xref-location-line 2146,85743 +(defun tags-loop-eval 1771,71313 +(defun tags-loop-continue 1782,71642 +(defun tags-search 1850,73948 +(defun tags-query-replace 1871,74774 +(defun tags-complete-tags-table-file 1896,75998 +(defun list-tags 1906,76377 +(defun tags-apropos 1934,77330 +(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78156 +(defun select-tags-table 1964,78395 +(defvar select-tags-table-mode-map 2019,80522 +(define-derived-mode select-tags-table-mode 2030,80905 +(defun select-tags-table-select 2034,81089 +(defun select-tags-table-quit 2043,81455 +(defun complete-tag 2049,81610 +(defconst etags--xref-limit 2074,82551 +(defvar etags-xref-find-definitions-tag-order 2076,82586 +(defun etags-xref-find 2082,82876 +(defun etags--xref-find-definitions 2096,83405 +(defclass xref-etags-location 2129,85120 +(defun xref-make-etags-location 2135,85343 +(cl-defmethod xref-location-marker 2139,85498 +(cl-defmethod xref-location-line 2146,85742 erl-src/gs_dialog.erl,98 -define(VERSION2,32 @@ -3386,50 +3386,64 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 +lua-src/test.lua,442 +function Rectangle.getPos 2,15 +function Rectangle.getPos getPos2,15 +function Circle.getPos 6,61 +function Circle.getPos getPos6,61 +function Cube.data.getFoo 10,102 +function Cube.data.getFoo getFoo10,102 +function Square.something:Bar 14,148 +function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 + make-src/Makefile,1156 LATEST=1,0 -NONSRCS=35,1578 -CPPFLAGS=49,2191 -LDFLAGS=50,2260 -FASTCFLAGS=55,2531 -FILTER=58,2642 - @-$($72,3064 - @-$($73,3113 - @-$($74,3177 - @-$($75,3223 - @-$($76,3291 - @-$($77,3383 - @$(81,3466 - @$(82,3514 - @$(83,3577 - @$(84,3622 - @$(85,3689 - @$(86,3780 -${CHECKOBJS}: CFLAGS=88,3806 - @env CHECKEROPTS=92,3922 - @$(98,4094 - @$(106,4250 - @$(110,4374 - @$(114,4500 - @for i in $(140,5315 - @for i in $(SRCS); do echo $$i;140,5315 - $(160,6053 - $(163,6114 - $(166,6177 - $(169,6228 - $(172,6317 - sdiff --suppress-common-lines --width=width186,6614 - sdiff --suppress-common-lines --width=width189,6703 - sdiff --suppress-common-lines --width=width192,6791 - sdiff --suppress-common-lines --width=width195,6880 - TEXTAGS=204,7122 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7122 - ${RUN} etags12 --members -o $@ --regex=regex207,7239 - ${RUN} ./ctags -o $@ --regex=regex213,7388 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7464 - TEXTAGS=219,7583 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7583 - ${RUN} ./extags -e --regex-c=c222,7710 +NONSRCS=35,1577 +CPPFLAGS=49,2190 +LDFLAGS=50,2259 +FASTCFLAGS=55,2530 +FILTER=58,2641 + @-$($72,3063 + @-$($73,3112 + @-$($74,3176 + @-$($75,3222 + @-$($76,3290 + @-$($77,3382 + @$(81,3465 + @$(82,3513 + @$(83,3576 + @$(84,3621 + @$(85,3688 + @$(86,3779 +${CHECKOBJS}: CFLAGS=88,3805 + @env CHECKEROPTS=92,3921 + @$(98,4093 + @$(106,4249 + @$(110,4373 + @$(114,4499 + @for i in $(140,5320 + @for i in $(SRCS); do echo $$i;140,5320 + $(160,6058 + $(163,6119 + $(166,6182 + $(169,6233 + $(172,6322 + sdiff --suppress-common-lines --width=width186,6619 + sdiff --suppress-common-lines --width=width189,6708 + sdiff --suppress-common-lines --width=width192,6796 + sdiff --suppress-common-lines --width=width195,6885 + TEXTAGS=204,7127 + TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 + ${RUN} etags12 --members -o $@ --regex=regex207,7244 + ${RUN} ./ctags -o $@ --regex=regex213,7393 + ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 + TEXTAGS=219,7588 + TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 + ${RUN} ./extags -e --regex-c=c222,7715 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -4042,6 +4056,31 @@ class Configure(760,24879 def save(797,26022 def nosave(807,26310 +ruby-src/test.rb,594 +module ModuleExample1,0 + class ClassExample2,21 + def class_method3,44 + def ClassExample.singleton_class_method6,116 + def class_method_exclamation!9,221 + def class_method_question?12,319 + def class_method_equals=class_method_equals=15,411 + def `(18,499 + def +(21,589 + def [](24,637 + def []=([]=27,687 + def <<(30,749 + def ==(==33,799 + def <=(<=36,869 + def <=>(<=>39,940 + def ===(===42,987 + def module_method46,1048 + def ModuleExample.singleton_module_method49,1110 + +ruby-src/test1.ruby,37 +class A1,0 + def a(2,8 + def b(5,38 + tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 \section{blah}blah8,139 diff --git a/test/manual/etags/ETAGS.good_6 b/test/manual/etags/ETAGS.good_6 index f3d17b10a3e..39522dbdb9b 100644 --- a/test/manual/etags/ETAGS.good_6 +++ b/test/manual/etags/ETAGS.good_6 @@ -3113,32 +3113,32 @@ class generic_object13,520 int where_in_registry;generic_object::where_in_registry15,547 generic_object(generic_object::generic_object17,582 ~generic_object(generic_object::~generic_object19,724 - virtual void compute_next_state(generic_object::compute_next_state21,842 - virtual void step(generic_object::step22,888 -const int max_num_directions 31,1219 -class location:location33,1289 - location(location::location43,1642 - ~location(location::~location44,1661 -class irregular_location:irregular_location47,1686 - double x,irregular_location::x49,1734 - double x, y,irregular_location::y49,1734 - double x, y, z;irregular_location::z49,1734 - irregular_location(irregular_location::irregular_location51,1762 - ~irregular_location(irregular_location::~irregular_location53,1854 -class discrete_location:discrete_location56,1889 - int x,discrete_location::x58,1936 - int x, y,discrete_location::y58,1936 - int x, y, z;discrete_location::z58,1936 - class location *neighbors[discrete_location::neighbors59,1953 - void clear_neighbors(discrete_location::clear_neighbors60,2004 - discrete_location(discrete_location::discrete_location62,2044 - ~discrete_location(discrete_location::~discrete_location65,2154 - void assign_neighbor(discrete_location::assign_neighbor66,2184 -class agent:agent75,2508 - location *where;agent::where77,2549 - agent(agent::agent79,2578 - ~agent(agent::~agent80,2591 - void move(agent::move81,2605 + virtual void compute_next_state(generic_object::compute_next_state21,843 + virtual void step(generic_object::step22,889 +const int max_num_directions 31,1220 +class location:location33,1290 + location(location::location43,1643 + ~location(location::~location44,1662 +class irregular_location:irregular_location47,1687 + double x,irregular_location::x49,1735 + double x, y,irregular_location::y49,1735 + double x, y, z;irregular_location::z49,1735 + irregular_location(irregular_location::irregular_location51,1763 + ~irregular_location(irregular_location::~irregular_location53,1855 +class discrete_location:discrete_location56,1890 + int x,discrete_location::x58,1937 + int x, y,discrete_location::y58,1937 + int x, y, z;discrete_location::z58,1937 + class location *neighbors[discrete_location::neighbors59,1954 + void clear_neighbors(discrete_location::clear_neighbors60,2005 + discrete_location(discrete_location::discrete_location62,2045 + ~discrete_location(discrete_location::~discrete_location65,2155 + void assign_neighbor(discrete_location::assign_neighbor66,2185 +class agent:agent75,2509 + location *where;agent::where77,2550 + agent(agent::agent79,2579 + ~agent(agent::~agent80,2592 + void move(agent::move81,2606 cp-src/fail.C,438 struct A 7,263 @@ -3268,28 +3268,28 @@ el-src/emacs/lisp/progmodes/etags.el,5188 (defun next-file 1685,67976 (defvar tags-loop-operate 1760,70890 (defvar tags-loop-scan1763,70984 -(defun tags-loop-eval 1771,71314 -(defun tags-loop-continue 1782,71643 -(defun tags-search 1850,73949 -(defun tags-query-replace 1871,74775 -(defun tags-complete-tags-table-file 1896,75999 -(defun list-tags 1906,76378 -(defun tags-apropos 1934,77331 -(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78157 -(defun select-tags-table 1964,78396 -(defvar select-tags-table-mode-map 2019,80523 -(define-derived-mode select-tags-table-mode 2030,80906 -(defun select-tags-table-select 2034,81090 -(defun select-tags-table-quit 2043,81456 -(defun complete-tag 2049,81611 -(defconst etags--xref-limit 2074,82552 -(defvar etags-xref-find-definitions-tag-order 2076,82587 -(defun etags-xref-find 2082,82877 -(defun etags--xref-find-definitions 2096,83406 -(defclass xref-etags-location 2129,85121 -(defun xref-make-etags-location 2135,85344 -(cl-defmethod xref-location-marker 2139,85499 -(cl-defmethod xref-location-line 2146,85743 +(defun tags-loop-eval 1771,71313 +(defun tags-loop-continue 1782,71642 +(defun tags-search 1850,73948 +(defun tags-query-replace 1871,74774 +(defun tags-complete-tags-table-file 1896,75998 +(defun list-tags 1906,76377 +(defun tags-apropos 1934,77330 +(define-button-type 'tags-select-tags-tabletags-select-tags-table1957,78156 +(defun select-tags-table 1964,78395 +(defvar select-tags-table-mode-map 2019,80522 +(define-derived-mode select-tags-table-mode 2030,80905 +(defun select-tags-table-select 2034,81089 +(defun select-tags-table-quit 2043,81455 +(defun complete-tag 2049,81610 +(defconst etags--xref-limit 2074,82551 +(defvar etags-xref-find-definitions-tag-order 2076,82586 +(defun etags-xref-find 2082,82876 +(defun etags--xref-find-definitions 2096,83405 +(defclass xref-etags-location 2129,85120 +(defun xref-make-etags-location 2135,85343 +(cl-defmethod xref-location-marker 2139,85498 +(cl-defmethod xref-location-line 2146,85742 erl-src/gs_dialog.erl,98 -define(VERSION2,32 @@ -3386,50 +3386,64 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 +lua-src/test.lua,442 +function Rectangle.getPos 2,15 +function Rectangle.getPos getPos2,15 +function Circle.getPos 6,61 +function Circle.getPos getPos6,61 +function Cube.data.getFoo 10,102 +function Cube.data.getFoo getFoo10,102 +function Square.something:Bar 14,148 +function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 + make-src/Makefile,1156 LATEST=1,0 -NONSRCS=35,1578 -CPPFLAGS=49,2191 -LDFLAGS=50,2260 -FASTCFLAGS=55,2531 -FILTER=58,2642 - @-$($72,3064 - @-$($73,3113 - @-$($74,3177 - @-$($75,3223 - @-$($76,3291 - @-$($77,3383 - @$(81,3466 - @$(82,3514 - @$(83,3577 - @$(84,3622 - @$(85,3689 - @$(86,3780 -${CHECKOBJS}: CFLAGS=88,3806 - @env CHECKEROPTS=92,3922 - @$(98,4094 - @$(106,4250 - @$(110,4374 - @$(114,4500 - @for i in $(140,5315 - @for i in $(SRCS); do echo $$i;140,5315 - $(160,6053 - $(163,6114 - $(166,6177 - $(169,6228 - $(172,6317 - sdiff --suppress-common-lines --width=width186,6614 - sdiff --suppress-common-lines --width=width189,6703 - sdiff --suppress-common-lines --width=width192,6791 - sdiff --suppress-common-lines --width=width195,6880 - TEXTAGS=204,7122 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7122 - ${RUN} etags12 --members -o $@ --regex=regex207,7239 - ${RUN} ./ctags -o $@ --regex=regex213,7388 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7464 - TEXTAGS=219,7583 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7583 - ${RUN} ./extags -e --regex-c=c222,7710 +NONSRCS=35,1577 +CPPFLAGS=49,2190 +LDFLAGS=50,2259 +FASTCFLAGS=55,2530 +FILTER=58,2641 + @-$($72,3063 + @-$($73,3112 + @-$($74,3176 + @-$($75,3222 + @-$($76,3290 + @-$($77,3382 + @$(81,3465 + @$(82,3513 + @$(83,3576 + @$(84,3621 + @$(85,3688 + @$(86,3779 +${CHECKOBJS}: CFLAGS=88,3805 + @env CHECKEROPTS=92,3921 + @$(98,4093 + @$(106,4249 + @$(110,4373 + @$(114,4499 + @for i in $(140,5320 + @for i in $(SRCS); do echo $$i;140,5320 + $(160,6058 + $(163,6119 + $(166,6182 + $(169,6233 + $(172,6322 + sdiff --suppress-common-lines --width=width186,6619 + sdiff --suppress-common-lines --width=width189,6708 + sdiff --suppress-common-lines --width=width192,6796 + sdiff --suppress-common-lines --width=width195,6885 + TEXTAGS=204,7127 + TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 + ${RUN} etags12 --members -o $@ --regex=regex207,7244 + ${RUN} ./ctags -o $@ --regex=regex213,7393 + ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 + TEXTAGS=219,7588 + TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 + ${RUN} ./extags -e --regex-c=c222,7715 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -4042,6 +4056,31 @@ class Configure(760,24879 def save(797,26022 def nosave(807,26310 +ruby-src/test.rb,594 +module ModuleExample1,0 + class ClassExample2,21 + def class_method3,44 + def ClassExample.singleton_class_method6,116 + def class_method_exclamation!9,221 + def class_method_question?12,319 + def class_method_equals=class_method_equals=15,411 + def `(18,499 + def +(21,589 + def [](24,637 + def []=([]=27,687 + def <<(30,749 + def ==(==33,799 + def <=(<=36,869 + def <=>(<=>39,940 + def ===(===42,987 + def module_method46,1048 + def ModuleExample.singleton_module_method49,1110 + +ruby-src/test1.ruby,37 +class A1,0 + def a(2,8 + def b(5,38 + tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 \section{blah}blah8,139 diff --git a/test/manual/etags/Makefile b/test/manual/etags/Makefile index f5cf2aeb3b5..4d9f358c8ed 100644 --- a/test/manual/etags/Makefile +++ b/test/manual/etags/Makefile @@ -13,7 +13,7 @@ FORTHSRC=$(addprefix ./forth-src/,test-forth.fth) FSRC=$(addprefix ./f-src/,entry.for entry.strange_suffix entry.strange) HTMLSRC=$(addprefix ./html-src/,softwarelibero.html index.shtml algrthms.html software.html) #JAVASRC=$(addprefix ./java-src/, ) -LUASRC=$(addprefix ./lua-src/,allegro.lua) +LUASRC=$(addprefix ./lua-src/,allegro.lua test.lua) MAKESRC=$(addprefix ./make-src/,Makefile) OBJCSRC=$(addprefix ./objc-src/,Subprocess.h Subprocess.m PackInsp.h PackInsp.m) OBJCPPSRC=$(addprefix ./objcpp-src/,SimpleCalc.H SimpleCalc.M) @@ -23,12 +23,13 @@ PHPSRC=$(addprefix ./php-src/,lce_functions.php ptest.php sendmail.php) PSSRC=$(addprefix ./ps-src/,rfc1245.ps) PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog) PYTSRC=$(addprefix ./pyt-src/,server.py) +RBSRC=$(addprefix ./ruby-src/,test.rb test1.ruby) TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex) YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y) SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\ ${FORTHSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC} ${OBJCSRC}\ ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC} ${PROLSRC} ${PYTSRC}\ - ${TEXSRC} ${YSRC} + ${RBSRC} ${TEXSRC} ${YSRC} NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz ETAGS_PROG=../../../lib-src/etags diff --git a/test/manual/indent/js.js b/test/manual/indent/js.js index d897b9f81e7..9a1e0dc7ad5 100644 --- a/test/manual/indent/js.js +++ b/test/manual/indent/js.js @@ -76,6 +76,20 @@ class A { } } +if (true) + 1 +else + 2 + +Foobar + .find() + .catch((err) => { + return 2; + }) + .then((num) => { + console.log(num); + }); + // Local Variables: // indent-tabs-mode: nil // js-indent-level: 2 diff --git a/test/src/keymap-tests.el b/test/src/keymap-tests.el index 973b2407391..524563fea50 100644 --- a/test/src/keymap-tests.el +++ b/test/src/keymap-tests.el @@ -23,7 +23,7 @@ (require 'ert) -(ert-deftest keymap-store_in_keymap-FASTINT-on-nonchars () +(ert-deftest keymap-store_in_keymap-XFASTINT-on-non-characters () "Check for bug fixed in \"Fix assertion violation in define-key\", commit 86c19714b097aa477d339ed99ffb5136c755a046." (let ((def (lookup-key Buffer-menu-mode-map [32]))) |