summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/lisp/cedet/semantic/format-resources/test-fmt.cpp (renamed from test/manual/cedet/tests/test-fmt.cpp)0
-rw-r--r--test/lisp/cedet/semantic/format-resources/test-fmt.el (renamed from test/manual/cedet/tests/test-fmt.el)2
-rw-r--r--test/lisp/cedet/semantic/format-tests.el (renamed from test/lisp/cedet/semantic-utest-fmt.el)38
3 files changed, 12 insertions, 28 deletions
diff --git a/test/manual/cedet/tests/test-fmt.cpp b/test/lisp/cedet/semantic/format-resources/test-fmt.cpp
index ab869c1ce00..ab869c1ce00 100644
--- a/test/manual/cedet/tests/test-fmt.cpp
+++ b/test/lisp/cedet/semantic/format-resources/test-fmt.cpp
diff --git a/test/manual/cedet/tests/test-fmt.el b/test/lisp/cedet/semantic/format-resources/test-fmt.el
index 122571323b2..941aaae8595 100644
--- a/test/manual/cedet/tests/test-fmt.el
+++ b/test/lisp/cedet/semantic/format-resources/test-fmt.el
@@ -1,4 +1,4 @@
-;;; test-fmt.el --- test semantic tag formatting
+;;; test-fmt.el --- test semantic tag formatting -*- lexical-binding: t -*-
;;; Copyright (C) 2012, 2019-2021 Free Software Foundation, Inc.
diff --git a/test/lisp/cedet/semantic-utest-fmt.el b/test/lisp/cedet/semantic/format-tests.el
index d6e5ce7a0fd..a9eb4489d59 100644
--- a/test/lisp/cedet/semantic-utest-fmt.el
+++ b/test/lisp/cedet/semantic/format-tests.el
@@ -1,4 +1,4 @@
-;;; cedet/semantic-utest-fmt.el --- Parsing / Formatting tests -*- lexical-binding:t -*-
+;;; semantic/format-tests.el --- Parsing / Formatting tests -*- lexical-binding:t -*-
;;; Copyright (C) 2003-2004, 2007-2021 Free Software Foundation, Inc.
@@ -28,19 +28,14 @@
;; make sure that the semantic-tag-format-* functions in question
;; created the desired output.
-(require 'semantic)
-(require 'semantic/format)
-
;;; Code:
-(defvar cedet-utest-directory
- (let* ((C (file-name-directory (locate-library "cedet")))
- (D (expand-file-name "../../test/manual/cedet/" C)))
- D)
- "Location of test files for this test suite.")
+(require 'ert)
+(require 'ert-x)
+(require 'semantic/format)
(defvar semantic-fmt-utest-file-list
- '("tests/test-fmt.cpp"
+ (list (ert-resource-file "test-fmt.cpp")
;; "tests/test-fmt.el" - add this when elisp is support by dflt in Emacs
)
"List of files to run unit tests in.")
@@ -53,21 +48,10 @@
Files to visit are in `semantic-fmt-utest-file-list'."
(save-current-buffer
(semantic-mode 1)
- (let ((fl semantic-fmt-utest-file-list)
- (fname nil)
- )
-
- (dolist (FILE fl)
-
- (save-current-buffer
- (setq fname (expand-file-name FILE cedet-utest-directory))
-
- ;; Make sure we have the files we think we have.
- (should (file-exists-p fname))
- ;; (error "Cannot find unit test file: %s" fname))
-
- ;; Run the tests.
- (let ((fb (find-buffer-visiting fname))
+ (let ((fl semantic-fmt-utest-file-list))
+ (dolist (fname fl)
+ (save-current-buffer
+ (let ((fb (find-buffer-visiting fname))
(b (semantic-find-file-noselect fname))
(tags nil))
@@ -122,6 +106,6 @@ Files to visit are in `semantic-fmt-utest-file-list'."
)))
-(provide 'cedet/semantic/fmt-utest)
+(provide 'format-tests)
-;;; semantic-fmt-utest.el ends here
+;;; format-tests.el ends here