1 ;;; test.el --- Unit test file for Semantic Emacs Lisp support.
3 ;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
5 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software: you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation, either version 3 of the License, or
12 ;; (at your option) any later version.
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 (require 'eieio
"../eieio")
27 ;; tags encapsulated in eval-when-compile and eval-and-compile
28 ;; should be expanded out into the outer environment.
30 (require 'semantic-imenu
)
34 (defconst const-1 nil
)
35 (defun function-1 (arg)
41 (defun a-defun (arg1 arg2
&optional arg3
)
45 (defun a-defun-interactive (arg1 arg2
&optional arg3
)
46 "doc a that is a command"
50 (defun* a-defun
* (arg1 arg2
&optional arg3
)
54 (defsubst a-defsubst
(arg1 arg2
&optional arg3
)
58 (defmacro a-defmacro
(arg1 arg2
&optional arg3
)
62 (define-overload a-overload
(arg)
68 (defmethod a-method ((obj some-class
) &optional arg2
)
69 "Doc String for a method."
72 (defgeneric a-generic
(arg1 arg2
)
73 "General description of a-generic.")
77 (defadvice existing-function-to-advise
(around test activate
)
78 "Do something special to this fcn."
83 (defvar a-defvar
(cons 1 2)
86 (defvar a-defvar-star
(cons 1 2)
87 "*User visible var a")
89 (defconst a-defconst
'a
"var doc const")
91 (defcustom a-defcustom nil
96 (defface a-defface
'bold
97 "A face that is bold.")
99 (defimage ezimage-page-minus
100 ((:type xpm
:file
"page-minus.xpm" :ascent center
))
101 "Image used for open files with stuff in them.")
105 (autoload (quote a-autoload
) "somefile"
106 "Non-interactive autoload." nil nil
)
108 (autoload (quote a-autoload-interactive
) "somefile"
109 "Interactive autoload." t nil
)
112 (defgroup a-defgroup nil
113 "Group for `emacs-lisp' regression-test")
117 (defclass a-class
(a-parent)
119 (slot-2 :initarg
:slot-2
)
120 (slot-3 :documentation
"Doc about slot3")
121 (slot-4 :type
'boolean
)
123 "Doc String for class.")
125 (defclass a-class-abstract
()
127 "Doc string for abstract class."
132 (defstruct (test-struct-1 :test
'equal
)
136 (defstruct test-struct-2
140 ;;; Semantic specific macros
147 (define-mode-local-override a-overridden-function
148 emacs-lisp-mode
(tag)
149 "A function that is overloaded."
152 (defvar-mode-local emacs-lisp-mode a-mode-local-def