[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests ab1acb9 300/316: Test refactor/m
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests ab1acb9 300/316: Test refactor/move |
Date: |
Sat, 28 Jan 2017 09:10:13 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit ab1acb99a5d01cec2a50e1dc74359b13b841ad79
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
Test refactor/move
* test/manual/cedet/cedet/semantic/ia-utest.el:
(semantic-ia-utest-file-list): Add tests/test.texi, test.mk, and
test.srt (semantic-ia-utest-buffer, semantic-ia-utest-buffer-refs)
(semantic-sr-utest-buffer-refs, semantic-src-utest-buffer-refs): When
scanning for comments, wrap comment-start-skip to handle modes that
have an unbound or in them. Skip back over whitespace from in front
of found test point comments.
---
test/manual/cedet/cedet/semantic/ia-utest.el | 28 ++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/test/manual/cedet/cedet/semantic/ia-utest.el
b/test/manual/cedet/cedet/semantic/ia-utest.el
index bc5b739..faab6e2 100644
--- a/test/manual/cedet/cedet/semantic/ia-utest.el
+++ b/test/manual/cedet/cedet/semantic/ia-utest.el
@@ -1,6 +1,6 @@
;;; semantic/ia-utest.el --- Analyzer unit tests
-;; Copyright (C) 2008, 2009, 2010, 2011, 2014 Eric M. Ludlam
+;; Copyright (C) 2008, 2009, 2010, 2011, 2014, 2015 Eric M. Ludlam
;; Author: Eric M. Ludlam <address@hidden>
@@ -53,6 +53,9 @@
"tests/testvarnames.java"
"tests/testf90.f90"
"tests/testwisent.wy"
+ "tests/test.texi"
+ "tests/test.mk"
+ "tests/test.srt"
)
"List of files with analyzer completion test points.")
@@ -102,6 +105,8 @@ Argument ARG specifies which set of tests to run.
(semantic-ia-utest-log " ** Starting tests in %s"
(buffer-name))
+ ;;(message "Mode: %S" major-mode)
+ ;;(message "CSS: %S" comment-start-skip)
(when (or (not arg) (= arg 1))
(semantic-ia-utest-buffer))
@@ -185,8 +190,10 @@ If the error occurs w/ a C or C++ file, rethrow the error."
)
;; Keep looking for test points until we run out.
(while (save-excursion
- (setq regex-p (concat "//\\s-*-" (number-to-string idx) "-" )
- regex-a (concat "//\\s-*#" (number-to-string idx) "#" ))
+ (setq regex-p ((concat "\\(" comment-start-skip "\\)\\s-*-"
+ (number-to-string idx) "-" )
+ regex-a (concat "\\(" comment-start-skip
"\\)\\s-*#"
+ (number-to-string idx) "#" ))
(goto-char (point-min))
(save-match-data
(when (re-search-forward regex-p nil t)
@@ -199,6 +206,7 @@ If the error occurs w/ a C or C++ file, rethrow the error."
(save-excursion
(goto-char p)
+ (skip-chars-backward " ") ;; some languages need a space.
(let* ((ctxt (semantic-analyze-current-context))
(acomp
@@ -211,7 +219,10 @@ If the error occurs w/ a C or C++ file, rethrow the error."
(let ((bss (buffer-substring-no-properties (point) (point-at-eol))))
(condition-case nil
- (setq desired (read bss))
+ (progn
+ (setq desired (read bss))
+ ;;(message "READ of %S from %S" desired bss)
+ )
(error (setq desired (format " FAILED TO PARSE: %S"
bss)))))
@@ -260,8 +271,8 @@ If the error occurs w/ a C or C++ file, rethrow the error."
)
;; Keep looking for test points until we run out.
(while (save-excursion
- (setq regex-p (concat "//\\s-*\\^" (number-to-string idx) "^" )
- )
+ (setq regex-p (concat "\\(" comment-start-skip
+ "\\)\\s-*\\^" (number-to-string idx) "^" )
(goto-char (point-min))
(save-match-data
(when (re-search-forward regex-p nil t)
@@ -381,7 +392,8 @@ If the error occurs w/ a C or C++ file, rethrow the error."
)
;; Keep looking for test points until we run out.
(while (save-excursion
- (setq regex-p (concat "//\\s-*\\%" (number-to-string idx) "%" )
+ (setq regex-p (concat "\\(" comment-start-skip "\\)\\s-*\\%"
+ (number-to-string idx) "%" )
)
(goto-char (point-min))
(save-match-data
@@ -479,7 +491,7 @@ If the error occurs w/ a C or C++ file, rethrow the error."
)
;; Keep looking for test points until we run out.
(while (save-excursion
- (setq regex-p (concat "//\\s-*@"
+ (setq regex-p (concat (setq regex-p (concat "\\("
comment-start-skip "\\)\\s-*@"
(number-to-string idx)
"@\\s-+\\(\\w+\\)" ))
(goto-char (point-min))
- [Emacs-diffs] scratch/merge-cedet-tests a93bc4a 292/316: Remove obsolete cvs-auto-updated 'X-RCS' line., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests a93bc4a 292/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ce2952b 312/316: Revert rev. 6995, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a78c71f 255/316: Fix documentation, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 41c7498 284/316: Better skip message, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 32b1d6c 260/316: First pass of creating a distribution., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 9679584 296/316: Remove compatibility function `cedet-called-interactively-p'., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests f8e3bbc 311/316: Return fully qualified types if necessary., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 0041d52 314/316: Add header comments and provide., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 0141378 247/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c672504 249/316: etc/srecode/c.srt: New file, contents from cpp.srt, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ab1acb9 300/316: Test refactor/move,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 75c52c3 055/316: (ms_structs, fun): New test example from Marting Stein., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests dbfb320 057/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d8b5630 060/316: Patch from Marcus Harnisch, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests dbed2db 058/316: Run the tests., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d58e8d8 063/316: Reverse the exist status of Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c9de94f 064/316: * cit-test.sh: Add support for running in batch mode., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 66b117d 071/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 0c4deea 079/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests feb2025 074/316: Don't check contents after initial fil, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 5812c59 073/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/28