From c2fada411ca3aaf3b52f2bf329c98996ad5dc981 Mon Sep 17 00:00:00 2001 From: Eric Ludlam Date: Sat, 20 Aug 2011 13:11:28 -0400 Subject: [PATCH] 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 49fc3e04299..3b52d6e8d69 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 @@ -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 -- 2.39.5