diff options
| author | Eric Ludlam | 2019-10-14 20:46:01 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-10-15 11:08:18 -0400 |
| commit | 128f803197c319807de838550270725ecdedbc7c (patch) | |
| tree | 917b8b90029ffed192ab9365e81afeae372f943b /test | |
| parent | a99812ee0fb7245d4ee3a862f3139c0a53a8c5d7 (diff) | |
| download | emacs-128f803197c319807de838550270725ecdedbc7c.tar.gz emacs-128f803197c319807de838550270725ecdedbc7c.zip | |
Update CEDET manual tests so that they run.
To run visit test/manual/cedet/cedet-utests.el
M-x eval-buffer
M-x cedet-utest
Author: Eric Ludlam <zappo@gnu.org>
Diffstat (limited to 'test')
| -rw-r--r-- | test/manual/cedet/cedet-utests.el | 56 | ||||
| -rw-r--r-- | test/manual/cedet/semantic-tests.el | 17 | ||||
| -rw-r--r-- | test/manual/cedet/srecode-tests.el | 2 |
3 files changed, 51 insertions, 24 deletions
diff --git a/test/manual/cedet/cedet-utests.el b/test/manual/cedet/cedet-utests.el index b8f08886fe7..369dff98f69 100644 --- a/test/manual/cedet/cedet-utests.el +++ b/test/manual/cedet/cedet-utests.el | |||
| @@ -26,6 +26,20 @@ | |||
| 26 | ;; into one command. | 26 | ;; into one command. |
| 27 | 27 | ||
| 28 | (require 'cedet) | 28 | (require 'cedet) |
| 29 | (require 'inversion) | ||
| 30 | |||
| 31 | (defvar cedet-utest-directory | ||
| 32 | (let* ((C (file-name-directory (locate-library "cedet"))) | ||
| 33 | (D (expand-file-name "../../test/manual/cedet/" C))) | ||
| 34 | D) | ||
| 35 | "Location of test files for this test suite.") | ||
| 36 | |||
| 37 | (defvar cedet-utest-libs '("ede-tests" | ||
| 38 | "semantic-tests" | ||
| 39 | "srecode-tests" | ||
| 40 | ) | ||
| 41 | "List of test srcs that need to be loaded.") | ||
| 42 | |||
| 29 | ;;; Code: | 43 | ;;; Code: |
| 30 | (defvar cedet-utest-test-alist | 44 | (defvar cedet-utest-test-alist |
| 31 | '( | 45 | '( |
| @@ -38,7 +52,9 @@ | |||
| 38 | 52 | ||
| 39 | ;; EZ Image dumping. | 53 | ;; EZ Image dumping. |
| 40 | ("ezimage associations" . ezimage-image-association-dump) | 54 | ("ezimage associations" . ezimage-image-association-dump) |
| 41 | ("ezimage images" . ezimage-image-dump) | 55 | ("ezimage images" . (lambda () |
| 56 | (ezimage-image-dump) | ||
| 57 | (kill-buffer "*Ezimage Images*"))) | ||
| 42 | 58 | ||
| 43 | ;; Pulse | 59 | ;; Pulse |
| 44 | ("pulse interactive test" . (lambda () (pulse-test t))) | 60 | ("pulse interactive test" . (lambda () (pulse-test t))) |
| @@ -49,14 +65,17 @@ | |||
| 49 | ;; | 65 | ;; |
| 50 | ;; EIEIO | 66 | ;; EIEIO |
| 51 | ;; | 67 | ;; |
| 52 | ("eieio" . (lambda () (let ((lib (locate-library "eieio-tests.el" | 68 | |
| 53 | t))) | 69 | ("eieio: browser" . (lambda () |
| 54 | (load-file lib)))) | 70 | (eieio-browse) |
| 55 | ("eieio: browser" . eieio-browse) | 71 | (kill-buffer "*EIEIO OBJECT BROWSE*"))) |
| 56 | ("eieio: custom" . (lambda () | 72 | ("eieio: custom" . (lambda () |
| 57 | (require 'eieio-custom) | 73 | (require 'eieio-custom) |
| 58 | (customize-variable 'eieio-widget-test))) | 74 | (customize-variable 'eieio-widget-test) |
| 75 | (kill-buffer "*Customize Option: Eieio Widget Test*") | ||
| 76 | )) | ||
| 59 | ("eieio: chart" . (lambda () | 77 | ("eieio: chart" . (lambda () |
| 78 | (require 'chart) | ||
| 60 | (if noninteractive | 79 | (if noninteractive |
| 61 | (message " ** Skipping test in noninteractive mode.") | 80 | (message " ** Skipping test in noninteractive mode.") |
| 62 | (chart-test-it-all)))) | 81 | (chart-test-it-all)))) |
| @@ -71,9 +90,9 @@ | |||
| 71 | ;; SEMANTIC | 90 | ;; SEMANTIC |
| 72 | ;; | 91 | ;; |
| 73 | ("semantic: lex spp table write" . semantic-lex-spp-write-utest) | 92 | ("semantic: lex spp table write" . semantic-lex-spp-write-utest) |
| 74 | ("semantic: multi-lang parsing" . semantic-utest-main) | 93 | ;;("semantic: multi-lang parsing" . semantic-utest-main) |
| 75 | ("semantic: C preprocessor" . semantic-utest-c) | 94 | ;;("semantic: C preprocessor" . semantic-utest-c) - Now in automated suite |
| 76 | ("semantic: analyzer tests" . semantic-ia-utest) | 95 | ;;("semantic: analyzer tests" . semantic-ia-utest) |
| 77 | ("semanticdb: data cache" . semantic-test-data-cache) | 96 | ("semanticdb: data cache" . semantic-test-data-cache) |
| 78 | ("semantic: throw-on-input" . | 97 | ("semantic: throw-on-input" . |
| 79 | (lambda () | 98 | (lambda () |
| @@ -81,14 +100,17 @@ | |||
| 81 | (message " ** Skipping test in noninteractive mode.") | 100 | (message " ** Skipping test in noninteractive mode.") |
| 82 | (semantic-test-throw-on-input)))) | 101 | (semantic-test-throw-on-input)))) |
| 83 | 102 | ||
| 84 | ("semantic: gcc: output parse test" . semantic-gcc-test-output-parser) | 103 | ;;("semantic: gcc: output parse test" . semantic-gcc-test-output-parser) |
| 104 | |||
| 85 | ;; | 105 | ;; |
| 86 | ;; SRECODE | 106 | ;; SRECODE |
| 87 | ;; | 107 | ;; |
| 88 | ("srecode: fields" . srecode-field-utest) | 108 | |
| 89 | ("srecode: templates" . srecode-utest-template-output) | 109 | ;; TODO - fix the fields test |
| 110 | ;;("srecode: fields" . srecode-field-utest) | ||
| 111 | ;;("srecode: templates" . srecode-utest-template-output) | ||
| 90 | ("srecode: show maps" . srecode-get-maps) | 112 | ("srecode: show maps" . srecode-get-maps) |
| 91 | ("srecode: getset" . srecode-utest-getset-output) | 113 | ;;("srecode: getset" . srecode-utest-getset-output) |
| 92 | ) | 114 | ) |
| 93 | "Alist of all the tests in CEDET we should run.") | 115 | "Alist of all the tests in CEDET we should run.") |
| 94 | 116 | ||
| @@ -100,9 +122,11 @@ | |||
| 100 | EXIT-ON-ERROR causes the test suite to exit on an error, instead | 122 | EXIT-ON-ERROR causes the test suite to exit on an error, instead |
| 101 | of just logging the error." | 123 | of just logging the error." |
| 102 | (interactive) | 124 | (interactive) |
| 103 | (if (or (not (featurep 'semanticdb-mode)) | 125 | (if (or (not (featurep 'semantic/db-mode)) |
| 104 | (not (semanticdb-minor-mode-p))) | 126 | (not (semanticdb-minor-mode-p))) |
| 105 | (error "CEDET Tests require: M-x semantic-load-enable-minimum-features")) | 127 | (error "CEDET Tests require semantic-mode to be enabled")) |
| 128 | (dolist (L cedet-utest-libs) | ||
| 129 | (load-file (expand-file-name (concat L ".el") cedet-utest-directory))) | ||
| 106 | (cedet-utest-log-setup "ALL TESTS") | 130 | (cedet-utest-log-setup "ALL TESTS") |
| 107 | (let ((tl cedet-utest-test-alist) | 131 | (let ((tl cedet-utest-test-alist) |
| 108 | (notes nil) | 132 | (notes nil) |
| @@ -489,7 +513,7 @@ When optional NO-ERROR don't throw an error if we can't run tests." | |||
| 489 | (when (interactive-p) | 513 | (when (interactive-p) |
| 490 | (message "<Press a key> Pulse line a specific color.") | 514 | (message "<Press a key> Pulse line a specific color.") |
| 491 | (read-char)) | 515 | (read-char)) |
| 492 | (pulse-momentary-highlight-one-line (point) 'modeline) | 516 | (pulse-momentary-highlight-one-line (point) 'mode-line) |
| 493 | (when (interactive-p) | 517 | (when (interactive-p) |
| 494 | (message "<Press a key> Pulse a pre-existing overlay.") | 518 | (message "<Press a key> Pulse a pre-existing overlay.") |
| 495 | (read-char)) | 519 | (read-char)) |
diff --git a/test/manual/cedet/semantic-tests.el b/test/manual/cedet/semantic-tests.el index 9109d665fa3..ce6467dedd8 100644 --- a/test/manual/cedet/semantic-tests.el +++ b/test/manual/cedet/semantic-tests.el | |||
| @@ -228,13 +228,16 @@ Analyze the area between BEG and END." | |||
| 228 | (defun semantic-lex-spp-write-utest () | 228 | (defun semantic-lex-spp-write-utest () |
| 229 | "Unit test using the test spp file to test the slot write fcn." | 229 | "Unit test using the test spp file to test the slot write fcn." |
| 230 | (interactive) | 230 | (interactive) |
| 231 | (let* ((sem (locate-library "semantic-lex-spp.el")) | 231 | (save-excursion |
| 232 | (dir (file-name-directory sem))) | 232 | (let ((buff (find-file-noselect |
| 233 | (save-excursion | 233 | (expand-file-name "tests/testsppreplace.c" |
| 234 | (set-buffer (find-file-noselect | 234 | cedet-utest-directory)))) |
| 235 | (expand-file-name "tests/testsppreplace.c" | 235 | (set-buffer buff) |
| 236 | dir))) | 236 | (semantic-lex-spp-write-test) |
| 237 | (semantic-lex-spp-write-test)))) | 237 | (kill-buffer buff) |
| 238 | (when (not (interactive-p)) | ||
| 239 | (kill-buffer "*SPP Write Test*")) | ||
| 240 | ))) | ||
| 238 | 241 | ||
| 239 | ;;; From semantic-tag-write: | 242 | ;;; From semantic-tag-write: |
| 240 | 243 | ||
diff --git a/test/manual/cedet/srecode-tests.el b/test/manual/cedet/srecode-tests.el index 94c5dbbd952..355bc0715d1 100644 --- a/test/manual/cedet/srecode-tests.el +++ b/test/manual/cedet/srecode-tests.el | |||
| @@ -243,7 +243,7 @@ It is filled with some text." | |||
| 243 | 243 | ||
| 244 | ;;; From srecode-document: | 244 | ;;; From srecode-document: |
| 245 | 245 | ||
| 246 | (require 'srecode/doc) | 246 | (require 'srecode/document) |
| 247 | 247 | ||
| 248 | (defun srecode-document-function-comment-extract-test () | 248 | (defun srecode-document-function-comment-extract-test () |
| 249 | "Test old comment extraction. | 249 | "Test old comment extraction. |