From: zappo Date: Sun, 13 Jun 2010 13:54:59 +0000 (+0000) Subject: Fixes for external db tests X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e9c9716fbdc7312aa34c9507a6ffa300295c1850;p=emacs.git Fixes for external db tests * test/manual/cedet/cit-externaldb.el: (cit-externaldb-files-to-find): Change files to those common between Make and AutoMake. (cit-gnu-externaldb-test-one): Require ede-locate Call `ede-enable-locate-on-project' to start/end the test so that the locate system is available for the project later. --- diff --git a/test/manual/cedet/cit-externaldb.el b/test/manual/cedet/cit-externaldb.el index 9c3d8c22f2b..5f50fc2892c 100644 --- a/test/manual/cedet/cit-externaldb.el +++ b/test/manual/cedet/cit-externaldb.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2010 Eric M. Ludlam ;; ;; Author: Eric M. Ludlam -;; X-RCS: $Id: cit-externaldb.el,v 1.1 2010-06-13 01:12:50 zappo Exp $ +;; X-RCS: $Id: cit-externaldb.el,v 1.2 2010-06-13 13:54:59 zappo Exp $ ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -35,7 +35,8 @@ (defvar cit-externaldb-files-to-find '(("foo.hpp" . "include/foo.hpp") - ("bar.cpp" . "src/bar.cpp") + ;;("foo.cpp" . "src/foo.cpp") + ("umltest.cpp" . "uml/umltest.cpp") ;("elfoo.el" . "src/elfoo.el") ;("foodoc.texi" . "src/foodoc.texi") ;("DNE.cpp" . "doesnotexist.cpp") @@ -114,10 +115,14 @@ (funcall createfcn nil) ;; 2) force ede's find file to use gnu global + (require 'ede-locate) (let* ((ede-locate-setup-options (list edelocatesym)) (base default-directory) (fname nil)) + ;; Change the locate tool active on this project. + (ede-enable-locate-on-project) + (dolist (F cit-externaldb-files-to-find) (let* ((raw (ede-expand-filename (ede-current-project) (car F))) (expect (cdr F)) @@ -127,10 +132,14 @@ (when (not (string= result expect)) (error "%s: Expected %s; Found %s" symrefsym expect result)) )) + + (let ((fail (ede-expand-filename (ede-current-project) "doesnotexist.cpp"))) + (if fail + (error "%s TEST: Found a file that shouldn't exist." symrefsym))) ) - (let ((fail (ede-expand-filename (ede-current-project) "doesnotexist.cpp"))) - (if fail - (error "%s TEST: Found a file that shouldn't exist." symrefsym))) + + ;; After removing the old locate system, restore the old one. + (ede-enable-locate-on-project) ;; 3) Look up tags with a GNU Global database (if semanticdbenablefcn