]> git.eshelyaron.com Git - emacs.git/commitdiff
Force srecode repo location and add decorations to debug output
authorEric Ludlam <zappo@gnu.org>
Sat, 20 Aug 2011 17:11:28 +0000 (13:11 -0400)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 17:28:21 +0000 (19:28 +0200)
* test/manual/cedet/cedet/srecode/test.el: (cl, cedet-uutil): New
 require (cedet-utests): Deleted require. (srecode-map-load-path):
 Force the srecode repository location in.  (srecode-utest-map-reset):
 New test fcn. (srecode-utest-test): Add decorations to debug
 output. (cedet/srecode/test): Fix require.

test/manual/cedet/cedet/srecode/test.el

index 49fc3e042992fd825db3642e7503c50e10b91659..3b52d6e8d6933428b0d0f92da5dc9a7cdb6dc2aa 100644 (file)
@@ -1,6 +1,6 @@
 ;;; srecode/test.el --- SRecode Core Template tests.
 
-;; Copyright (C) 2008, 2009, 2010 Eric M. Ludlam
+;; Copyright (C) 2008, 2009, 2010, 2011 Eric M. Ludlam
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 
 ;; Tests of SRecode template insertion routines and tricks.
 ;;
 
+(eval-when-compile (require 'cl))
+
+(require 'cedet-uutil)
+
+(require 'srecode/map)
+;; Force this test to use the templates from the CEDET install these
+;; tests are running from.
+(add-to-list 'srecode-map-load-path
+            (expand-file-name "etc/srecode"
+                              (file-name-directory
+                               (directory-file-name cedet-utest-root))))
+
 (require 'srecode/insert)
 (require 'srecode/dictionary)
-(require 'cedet-utests)
+
 
 ;;; Code:
 
+;;; MAP DUMP TESTING
+(defun srecode-utest-map-reset ()
+  "Reset, then dump the map of templates."
+  (interactive)
+  (message "SRecode Template Path: %S" srecode-map-load-path)
+  ;; Interactive call allows us to dump.
+  (call-interactively 'srecode-get-maps)
+  (switch-to-buffer "*SRECODE MAP*")
+  (message (buffer-string))
+  )
+
 ;;; OUTPUT TESTING
 ;;
 (defclass srecode-utest-output ()
@@ -106,7 +129,7 @@ Assumes that the current buffer is the testing buffer."
  ------------- vv expected vv ------------\n\n"
                  output-1)
          (pop-to-buffer (current-buffer))
-         (error "Entry %s failed; expected: %s; actual: %s"
+         (error "Entry %s failed; expected: --[%s]--; actual: --[%s]--"
                 (object-name o) output-1 actual)))))
   )
 
@@ -350,5 +373,5 @@ INSIDE SECTION: ARG HANDLER ONE")
       )))
 
 
-(provide 'srecode/test)
+(provide 'cedet/srecode/test)
 ;;; srecode/test.el ends here