;;; 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 <eric@siege-engine.com>
"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.")
(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))
)
;; 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)
(save-excursion
(goto-char p)
+ (skip-chars-backward " ") ;; some languages need a space.
(let* ((ctxt (semantic-analyze-current-context))
(acomp
(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)))))
)
;; 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)
)
;; 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
)
;; 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))