1 ;; Copyright (C) 2004 Vin Shelton
3 ;; Author: Vin Shelton <acs@xemacs.org>
4 ;; Maintainer: Vin Shelton <acs@xemacs.org>
8 ;; This file is part of XEmacs.
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 ;;; Synched up with: Not in FSF.
30 ;; See test-harness.el for instructions on how to run these tests.
32 (let ((testfile "tag-test.c")
34 (tags-build-completion-table nil))
39 (with-temp-file tagfile
43 struct mystruct
\7fmystruct
\ 12,1
44 struct mystruct *foo\(
\7f4,23
45 DEFUN \(\"require\", Frequire,
\7frequire,
\ 17,51
48 ;; Create the test file
49 (with-temp-file testfile
54 struct mystruct *foo\(\) {
57 DEFUN \(\"require\", Frequire, 1, 2, 0, /*
58 If feature FEATURE is not loaded, load it from FILENAME.
59 If FEATURE is not a member of the list `features', then the feature
60 is not loaded; so load the file FILENAME.
61 If FILENAME is omitted, the printname of FEATURE is used as the file name.
63 \(feature, filename\)\)
68 (let ((tags-always-exact t))
70 ;; Search for the tag "mystruct"; this should succeed
72 (find-tag "mystruct"))
73 (Assert (eq (point) 2))
75 ;; Search again. The search should fail, based on the patch that
76 ;; Sven Grundmann submitted for 21.4.16.
77 (Check-Error-Message error "No more entries matching mystruct"
79 (tags-loop-continue))))
81 (let ((tags-always-exact nil))
83 ;; Search for the definition of "require". Until the etags.el upgrade
84 ;; from 21.5 in 21.4.16, this test would fail.
89 (Assert (eq (point) 52)))
91 (kill-buffer testfile)
92 (delete-file testfile)
94 (delete-file tagfile))