[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: |
Sat, 28 Jan 2017 09:09:54 +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 34041d4 120/316: Synchronize cedet/semantic with Emacs., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 34041d4 120/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d08bd3b 117/316: C/C++: Fix function pointer parsing, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 3a7b458 110/316: Fixes for security tests, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ceb9293 130/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 6d9366a 135/316: Make 'this' a pointer., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests fb82965 136/316: Test `this' from in inline member functions, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 64c305b 137/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c132878 122/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 0897a28 127/316: Test file for Project.ede proj., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests f3a937b 143/316: Test project file., Edward John Steere, 2017/01/28
- [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 8900419 148/316: Added arduino project detection, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 19ff260 128/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests cd08101 179/316: Added cit uml, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ebff99d 215/316: Another 'using namespace' fix, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 40f1fa1 163/316: Synchronize base 'cedet' with Emacs, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 3fd7717 192/316: Synchronize cedet/srecode with Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests e805e93 223/316: semantic/bovine/c: Parse C++11 strongly typed enum, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 40b4bd4 204/316: Adedd `ede-detect-utest', Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 6bd181e 224/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 765b8f9 208/316: (cedet-utest-test-alist): Add ede-detect-linux-utest., Edward John Steere, 2017/01/28