1 ;;; test.el --- Unit test file for Semantic Emacs Lisp support.
3 ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 ;; Free Software Foundation, Inc.
6 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 (require 'eieio
"../eieio")
28 ;; tags encapsulated in eval-when-compile and eval-and-compile
29 ;; should be expanded out into the outer environment.
31 (require 'semantic-imenu
)
35 (defconst const-1 nil
)
36 (defun function-1 (arg)
42 (defun a-defun (arg1 arg2
&optional arg3
)
46 (defun a-defun-interactive (arg1 arg2
&optional arg3
)
47 "doc a that is a command"
51 (defun* a-defun
* (arg1 arg2
&optional arg3
)
55 (defsubst a-defsubst
(arg1 arg2
&optional arg3
)
59 (defmacro a-defmacro
(arg1 arg2
&optional arg3
)
63 (define-overload a-overload
(arg)
69 (defmethod a-method ((obj some-class
) &optional arg2
)
70 "Doc String for a method."
73 (defgeneric a-generic
(arg1 arg2
)
74 "General description of a-generic.")
78 (defadvice existing-function-to-advise
(around test activate
)
79 "Do something special to this fcn."
84 (defvar a-defvar
(cons 1 2)
87 (defvar a-defvar-star
(cons 1 2)
88 "*User visible var a")
90 (defconst a-defconst
'a
"var doc const")
92 (defcustom a-defcustom nil
97 (defface a-defface
'bold
98 "A face that is bold.")
100 (defimage ezimage-page-minus
101 ((:type xpm
:file
"page-minus.xpm" :ascent center
))
102 "Image used for open files with stuff in them.")
106 (autoload (quote a-autoload
) "somefile"
107 "Non-interactive autoload." nil nil
)
109 (autoload (quote a-autoload-interactive
) "somefile"
110 "Interactive autoload." t nil
)
113 (defgroup a-defgroup nil
114 "Group for `emacs-lisp' regression-test")
118 (defclass a-class
(a-parent)
120 (slot-2 :initarg
:slot-2
)
121 (slot-3 :documentation
"Doc about slot3")
122 (slot-4 :type
'boolean
)
124 "Doc String for class.")
126 (defclass a-class-abstract
()
128 "Doc string for abstract class."
133 (defstruct (test-struct-1 :test
'equal
)
137 (defstruct test-struct-2
141 ;;; Semantic specific macros
148 (define-mode-local-override a-overriden-function
149 emacs-lisp-mode
(tag)
150 "A function that is overloaded."
153 (defvar-mode-local emacs-lisp-mode a-mode-local-def
161 ;; arch-tag: ecda6dd6-db71-4b28-aa47-6adc585dce06