summaryrefslogtreecommitdiff
path: root/test/src/syntax-tests.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-10-23 16:29:46 +0200
committerStefan Kangas <stefan@marxist.se>2020-10-23 16:29:46 +0200
commit49bc8586b7abc8e1e36027ca5eec0d0488a27474 (patch)
treedd3d9c8a4eb7e85205ee7565d01c91ca21ef79ec /test/src/syntax-tests.el
parentd21cdb6c056453d4e4ef8a3a1f27d8bc203c09ea (diff)
downloademacs-49bc8586b7abc8e1e36027ca5eec0d0488a27474.tar.gz
Move some test data to follow our conventions
* test/data/emacs-module/mod-test.c: Move from here... * test/src/emacs-module-resources/mod-test.c: ...to here. * test/src/emacs-module-tests.el (ert-x): Require. (mod-test-file, module/describe-function-1): * test/Makefile.in (test_module_dir): Adjust for move. * test/data/files-bug18141.el.gz: Move from here... * test/lisp/files-resources/files-bug18141.el.gz: ... to here. * test/lisp/files-tests.el (ert-x): Require. (files-test-bug-18141-file): Use ert-resource-file. * test/data/mailcap/mime.types: Move from here... * test/lisp/net/mailcap-resources/mime.types: ...to here. * test/lisp/net/mailcap-tests.el (ert-x): Require. (mailcap-tests-path): Use ert-resource-file. * test/data/somelib.el: * test/data/somelib2.el: Move from here... * test/src/lread-resources/somelib.el: * test/src/lread-resources/somelib2.el: ...to here. * test/src/lread-tests.el (ert, ert-x): Require. (lread-test-bug26837): Use ert-resource-directory. * test/data/syntax-comments.txt: Move from here.... * test/src/syntax-resources/syntax-comments.txt: ...to here. * test/src/syntax-tests.el (ert-x): Require. (syntax-comments, syntax-br-comments, syntax-pps-comments): Use ert-resource-file. * test/data/xref/file1.txt: * test/data/xref/file2.txt: Move from here... * test/lisp/progmodes/xref-resources/file1.txt: * test/lisp/progmodes/xref-resources/file2.txt: ...to here. * test/lisp/progmodes/xref-tests.el (ert, ert-x): Require. (xref-tests-data-dir): Use ert-resource-directory.
Diffstat (limited to 'test/src/syntax-tests.el')
-rw-r--r--test/src/syntax-tests.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el
index 56e03380579..4b9c3f277aa 100644
--- a/test/src/syntax-tests.el
+++ b/test/src/syntax-tests.el
@@ -20,6 +20,7 @@
;;; Code:
(require 'ert)
+(require 'ert-x)
(ert-deftest parse-partial-sexp-continue-over-comment-marker ()
"Continue a parse that stopped in the middle of a comment marker."
@@ -91,7 +92,7 @@ also has open paren syntax (see Bug#24870)."
;; It is intended to enhance this bit to test nested comments
;; (2020-10-01).
-;; This bit uses the data file test/data/syntax-comments.txt.
+;; This bit uses the data file syntax-resources/syntax-comments.txt.
(defun syntax-comments-point (n forw)
"Return the buffer offset corresponding to the \"label\" N.
@@ -182,8 +183,7 @@ missing or nil, the value of START is assumed for it."
()
(with-current-buffer
(find-file
- ,(expand-file-name "data/syntax-comments.txt"
- (getenv "EMACS_TEST_DIRECTORY")))
+ ,(ert-resource-file "syntax-comments.txt"))
(,(intern (concat (symbol-name type) "-in")))
(goto-char (syntax-comments-point ,start ,forw))
(let ((stop (syntax-comments-point ,(or stop start) ,(not forw))))
@@ -230,8 +230,7 @@ missing or nil, the value of -START- is assumed for it."
()
(with-current-buffer
(find-file
- ,(expand-file-name "data/syntax-comments.txt"
- (getenv "EMACS_TEST_DIRECTORY")))
+ ,(ert-resource-file "syntax-comments.txt"))
(,(intern (concat (symbol-name type) "-in")))
(let ((start-pos (syntax-comments-point ,start ,forw))
,@(if res
@@ -285,8 +284,7 @@ the `parse-partial-sexp's are expected to stop. See
()
(with-current-buffer
(find-file
- ,(expand-file-name "data/syntax-comments.txt"
- (getenv "EMACS_TEST_DIRECTORY")))
+ ,(ert-resource-file "syntax-comments.txt"))
(,(intern (concat (symbol-name type) "-in")))
(let ((start-pos (syntax-comments-point ,start t))
(open-pos (syntax-comments-midpoint ,open))