[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 876d3e9 138/316: New EDE project
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 876d3e9 138/316: New EDE project for testing dirmatch features. |
Date: |
Fri, 27 Jan 2017 20:03:35 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 876d3e9f9b20779d24259dab1fc11493b1dcbbdc
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
New EDE project for testing dirmatch features.
---
test/manual/cedet/cedet/ede/detect-dirtest.el | 88 +++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/test/manual/cedet/cedet/ede/detect-dirtest.el
b/test/manual/cedet/cedet/ede/detect-dirtest.el
new file mode 100644
index 0000000..483435a
--- /dev/null
+++ b/test/manual/cedet/cedet/ede/detect-dirtest.el
@@ -0,0 +1,88 @@
+;;; detect-dirtest.el --- A dirtest custom EDE project
+;;
+;; Copyright (C) 2014 Eric M. Ludlam
+;;
+;; Author: Eric M. Ludlam <address@hidden>
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation, either version 3 of the
+;; License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see http://www.gnu.org/licenses/.
+
+;;; Commentary:
+;;
+;; This EDE project is designed to test the dirtesting feature
+;; and make sure:
+;; 1) We don't load this file unless needed.
+;; 2) We load the file when it is needed, and can detect the missing project.
+
+;;; Code:
+
+;;; NOTE: The ede-autoloader is in detect-utest.el
+
+(defclass ede-detect-test-dirmatch-project (ede-project)
+ ( )
+ "A simple project for testing dirmatch.")
+
+(defun ede-dirmatch-load (dir)
+ "Return a dirmatch project object if there is one.
+Return nil if there isn't one.
+Argument DIR is the directory it is created for.
+ROOTPROJ is nil, sinc there is only one project for a directory tree."
+ (let* ((proj (ede-directory-get-open-project dir)))
+ (if proj
+ proj
+
+ ;; Create a new project here.
+ (let* ((name (file-name-nondirectory (directory-file-name dir)))
+ (cpp (expand-file-name (concat name ".cpp") dir)))
+ (setq proj (ede-detect-test-dirmatch-project
+ name
+ :name name
+ :directory (file-name-as-directory dir)
+ :file cpp
+ :targets nil))
+ ;;(message "Create dirtest project type!")
+ proj
+ )
+ )))
+
+(defmethod ede-project-root ((this ede-detect-test-dirmatch-project))
+ "Return my root."
+ this)
+
+(defmethod ede-find-target ((proj ede-detect-test-dirmatch-project) buffer)
+ "Fab up a target for this test."
+ (let* ((targets (oref proj targets))
+ )
+ (if targets
+ (car targets)
+ (let* ((dir (file-name-directory (buffer-file-name buffer)))
+ (ans (ede-target
+ dir
+ :name (file-name-nondirectory
+ (directory-file-name dir))
+ :path dir
+ :source nil)))
+ (object-add-to-list proj :targets ans)
+ ;;(message "Created target for dirtest project type!")
+ ans))))
+
+(defmethod ede-find-subproject-for-directory ((proj
ede-detect-test-dirmatch-project)
+ dir)
+ "Return PROJ, for handling all subdirs below DIR."
+ proj)
+
+;;(message "Loaded detect-dirtest.el")
+
+(provide 'cedet/ede/detect-dirtest)
+
+;;; detect-dirtest.el ends here
- [Emacs-diffs] scratch/merge-cedet-tests ad45c79 263/316: Remove obsolete cvs-auto-updated 'X-RCS' line., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests ad45c79 263/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 784b5c8 231/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 41c7498 284/316: Better skip message, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9480090 261/316: Test updating the project version, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c89acc2 305/316: Add test code for use with sources in globalref, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests a9cd804 265/316: New tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c132878 122/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bfed386 181/316: (cit-finish-message): Add a pause, then exit with a status of "1"., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ba748b5 174/316: Added gnustep tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 5ef7a99 157/316: tests: Fix typo in ede/detect-utest, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 876d3e9 138/316: New EDE project for testing dirmatch features.,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 49b4ce7 213/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2f8e8c8 272/316: Remove eieio bits and only use eieio bits for make types, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e9c9716 279/316: Fixes for external db tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bef87bf 290/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 101da66 306/316: Don't scan other files because Util.cc is already in a buffer, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests a60b900 267/316: Fix provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ab1acb9 300/316: Test refactor/move, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 446edba 291/316: Base template for cit testing., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 1d09e4c 217/316: C++: Deal with 'using' statements when calculating scope, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 07892f6 287/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27