]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixes for external db tests
authorzappo <zappo@users.sourceforge.net>
Sun, 13 Jun 2010 13:54:59 +0000 (13:54 +0000)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 18:13:42 +0000 (20:13 +0200)
* 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.

test/manual/cedet/cit-externaldb.el

index 9c3d8c22f2bd2ca4091f908e2b29cc0430f1143f..5f50fc2892cd4878470b3519563ff842ad17efbf 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2010 Eric M. Ludlam
 ;;
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
-;; 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")
     (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))
          (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