[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: |
Fri, 27 Jan 2017 20:03:48 +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 bfed386 181/316: (cit-finish-message): Add a pause, then exit with a status of "1"., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests bfed386 181/316: (cit-finish-message): Add a pause, then exit with a status of "1"., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ba748b5 174/316: Added gnustep tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 5ef7a99 157/316: tests: Fix typo in ede/detect-utest, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 876d3e9 138/316: New EDE project for testing dirmatch features., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 49b4ce7 213/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2f8e8c8 272/316: Remove eieio bits and only use eieio bits for make types, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e9c9716 279/316: Fixes for external db tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bef87bf 290/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 101da66 306/316: Don't scan other files because Util.cc is already in a buffer, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests a60b900 267/316: Fix provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ab1acb9 300/316: Test refactor/move,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 446edba 291/316: Base template for cit testing., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 1d09e4c 217/316: C++: Deal with 'using' statements when calculating scope, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 07892f6 287/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9767368 308/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 7f7d6bf 229/316: Synchronize cedet/srecode with Emacs., Edward John Steere, 2017/01/27