emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests c2fada4 230/316: Force srecode r


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests c2fada4 230/316: Force srecode repo location and add decorations to debug output
Date: Sat, 28 Jan 2017 09:10:04 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit c2fada411ca3aaf3b52f2bf329c98996ad5dc981
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>

    Force srecode repo location and add decorations to debug output
    
    * 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 |   31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/test/manual/cedet/cedet/srecode/test.el 
b/test/manual/cedet/cedet/srecode/test.el
index 49fc3e0..3b52d6e 100644
--- a/test/manual/cedet/cedet/srecode/test.el
+++ b/test/manual/cedet/cedet/srecode/test.el
@@ -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 <address@hidden>
 
@@ -24,12 +24,35 @@
 ;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]