Mention false positives of file-accessible-directory on w32
[emacs.git] / test / cedet / tests / test.el
blob28b97750df2f6abaaac8986432a006c3dfc8e8be
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/>.
22 ;;; Require
24 (require 'semantic)
25 (require 'eieio "../eieio")
27 ;; tags encapsulated in eval-when-compile and eval-and-compile
28 ;; should be expanded out into the outer environment.
29 (eval-when-compile
30 (require 'semantic-imenu)
33 (eval-and-compile
34 (defconst const-1 nil)
35 (defun function-1 (arg)
36 nil)
39 ;;; Functions
41 (defun a-defun (arg1 arg2 &optional arg3)
42 "doc a"
43 nil)
45 (defun a-defun-interactive (arg1 arg2 &optional arg3)
46 "doc a that is a command"
47 (interactive "R")
48 nil)
50 (defun* a-defun* (arg1 arg2 &optional arg3)
51 "doc a*"
52 nil)
54 (defsubst a-defsubst (arg1 arg2 &optional arg3)
55 "doc a-subst"
56 nil)
58 (defmacro a-defmacro (arg1 arg2 &optional arg3)
59 "doc a-macro"
60 nil)
62 (define-overload a-overload (arg)
63 "doc a-overload"
64 nil)
66 ;;; Methods
68 (defmethod a-method ((obj some-class) &optional arg2)
69 "Doc String for a method."
70 (call-next-method))
72 (defgeneric a-generic (arg1 arg2)
73 "General description of a-generic.")
75 ;;; Advice
77 (defadvice existing-function-to-advise (around test activate)
78 "Do something special to this fcn."
79 (ad-do-it))
81 ;;; Variables
83 (defvar a-defvar (cons 1 2)
84 "Variable a")
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
92 "*doc custom"
93 :group 'a-defgroup
94 :type 'boolean)
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.")
103 ;;; Autoloads
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")
115 ;;; Classes
117 (defclass a-class (a-parent)
118 ((slot-1)
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."
128 :abstract t)
130 ;;; Structures
132 (defstruct (test-struct-1 :test 'equal)
133 (slot-1 :equal 'eq)
134 slot-2)
136 (defstruct test-struct-2
137 slot-1
138 slot-2)
140 ;;; Semantic specific macros
142 (define-lex a-lexer
143 "Doc String"
144 this
145 that)
147 (define-mode-local-override a-overridden-function
148 emacs-lisp-mode (tag)
149 "A function that is overloaded."
150 nil)
152 (defvar-mode-local emacs-lisp-mode a-mode-local-def
153 "some value")
156 ;;; Provide
158 (provide 'test)