Commit 000f5e0e authored by Eli Zaretskii's avatar Eli Zaretskii

Add a test suite for etags

* test/etags/: New test suite, adapted from
http://fly.isti.cnr.it/pub/software/unix/etags-regression-test.tar.bz2,
whose original author is Francesco Potortì <pot@gnu.org>.
parent c03c195a
......@@ -39,11 +39,13 @@ src/config.in
Info.plist
InfoPlist.strings
Makefile
makefile
!admin/charsets/Makefile
!etc/refcards/Makefile
!test/automated/data/flymake/Makefile
!test/indent/Makefile
makefile
!test/etags/Makefile
!test/etags/make-src/Makefile
/*.cache
/confdefs.h
/config.status
......@@ -145,6 +147,10 @@ src/*.map
# Tests.
test/indent/*.new
test/biditest.txt
test/etags/srclist
test/etags/regexfile
test/etags/ETAGS
test/etags/CTAGS
# ctags, etags.
TAGS
......@@ -200,6 +206,7 @@ lisp/international/uni-*.el
*.fn
*.fns
*.html
!test/etags/html-src/*.html
*.info
*.ky
*.kys
......@@ -215,6 +222,7 @@ lisp/international/uni-*.el
*.pj
*.pjs
*.ps
!test/etags/ps-src/*.ps
*.sc
*.scs
*.t2d/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
ADASRC=$(addprefix ./ada-src/,etags-test-for.ada 2ataspri.adb 2ataspri.ads waroquiers.ada)
ASRC=$(addprefix ./a-src/,empty.zz empty.zz.gz)
CSRC=$(addprefix ./c-src/,abbrev.c .//c.c torture.c getopt.h etags.c\
exit.c exit.strange_suffix sysdep.h tab.c dostorture.c\
emacs/src/gmalloc.c emacs/src/regex.h emacs/src/keyboard.c emacs/src/lisp.h\
machsyscalls.c machsyscalls.h fail.c a/b/b.c) ../etags/c-src/h.h
CPSRC=$(addprefix ./cp-src/,c.C abstract.C abstract.H cfront.H burton.cpp burton.cpp\
functions.cpp MDiagArray2.h Pctest.h Range.h\
screen.cpp screen.hpp conway.cpp conway.hpp clheir.cpp.gz clheir.hpp.gz fail.C)
ELSRC=$(addprefix ./el-src/,TAGTEST.EL emacs/lisp/progmodes/etags.el)
ERLSRC=$(addprefix ./erl-src/,gs_dialog.erl lines.erl lists.erl)
FORTHSRC=$(addprefix ./forth-src/,test-forth.fth)
FSRC=$(addprefix ./f-src/,entry.for entry.strange_suffix entry.strange)
HTMLSRC=$(addprefix ./html-src/,softwarelibero.html index.shtml algrthms.html software.html)
JAVASRC=$(addprefix ./java-src/,AWTEMul.java KeyEve.java SMan.java SysCol.java TG.java)
LUASRC=$(addprefix ./lua-src/,allegro.lua)
MAKESRC=$(addprefix ./make-src/,Makefile)
OBJCSRC=$(addprefix ./objc-src/,Subprocess.h Subprocess.m PackInsp.h PackInsp.m)
OBJCPPSRC=$(addprefix ./objcpp-src/,SimpleCalc.H SimpleCalc.M)
PASSRC=$(addprefix ./pas-src/,common.pas)
PERLSRC=$(addprefix ./perl-src/,htlmify-cystic yagrip.pl kai-test.pl mirror.pl)
PHPSRC=$(addprefix ./php-src/,lce_functions.php ptest.php sendmail.php)
PSSRC=$(addprefix ./ps-src/,rfc1245.ps)
PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog)
PYTSRC=$(addprefix ./pyt-src/,server.py)
TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex)
YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y)
SRCS=Makefile ${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\
${FORTHSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC} ${OBJCSRC}\
${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC} ${PROLSRC} ${PYTSRC}\
${TEXSRC} ${YSRC}
NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz
ETAGS_PROG=../../lib-src/etags
CTAGS_PROG=../../lib-src/ctags
REGEX=/[ \t]*DEFVAR_[A-Z_ \t\n(]+"\([^"]+\)"/
xx="this line is here because of a fontlock bug
RUN=
OPTIONS=--members --declarations --regex=@regexfile
ARGS=- < srclist
infiles = $(filter-out ${NONSRCS},${SRCS}) srclist regexfile
check:
@$(MAKE) OPTIONS='--no-members' ediff_1
@$(MAKE) OPTIONS='--declarations --no-members' ediff_2
@$(MAKE) OPTIONS='--members' ediff_3
@$(MAKE) OPTIONS='--regex=@regexfile --no-members' ediff_4
@$(MAKE) OPTIONS='nonexistent --members --declarations --regex=@regexfile' ediff_5
@$(MAKE) cdiff
ediff%: ETAGS.good% ETAGS ${infiles}
diff -u --suppress-common-lines --width=80 ETAGS.good$* ETAGS
cdiff: CTAGS.good CTAGS ${infiles}
diff -u --suppress-common-lines --width=80 CTAGS.good CTAGS
ETAGS: FRC ${infiles}
${RUN} ${ETAGS_PROG} ${OPTIONS} -o $@ ${ARGS}
CTAGS: FRC ${infiles}
${RUN} ${CTAGS_PROG} -o $@ --regex=@regexfile ${ARGS}
srclist: Makefile
@for i in $(SRCS); do echo $$i; done > srclist
@echo "srclist remade"
regexfile: Makefile
@echo ' -- This is for GNU Emacs source files' > regexfile
@echo '${REGEX}' >> regexfile
@echo '{c}${REGEX}\\1/m' >> regexfile
@echo "regexfile remade"
.PRECIOUS: ETAGS.good CTAGS.good
FRC:;
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
This diff is collapsed.
type LL_Task_Procedure_Access is access procedure (Arg : System.Address);
function Body_Required
(N : Node_Id) return Boolean is
begin
pragma Assert (False
or else NT (N).Nkind = N_Compilation_Unit);
return Flag13 (N);
end Body_Required;
type Type_Specific_Data is record
Idepth : Natural;
Expanded_Name : Cstring_Ptr;
External_Tag : Cstring_Ptr;
HT_Link : Tag;
Ancestor_Tags : Tag_Table (Natural);
end record;
function "abs" (Right : Complex) return Real'Base renames Modulus;
type Barrier_Function_Pointer is access
function
(O : System.Address;
E : Protected_Entry_Index)
return Boolean;
function "=" (L, R : System.Address) return Boolean
renames System."=";
type usfreelock_ptr is access
procedure (lock : ulock_t; arena : usptr_t_ptr);
function p pragma Import (C,
"pthread_mutexattr_setprio_ceiling",
"pthread_mutexattr_setprio_ceiling");
pragma Import ()
procedure LL_Wrapper (T : TCB_Ptr);
function p ("p");
-- This file is an Ada file containing test data
-- for etags (Ada83 and Ada95 support).
package Pkg1 is
type Private_T is private;
package Inner1 is
procedure Private_T;
end Inner1;
package Inner2 is
task Private_T;
end Inner2;
type Public_T is
record
A : Integer;
B : Integer;
end record;
procedure Pkg1_Proc1;
procedure Pkg1_Proc2 (I : Integer);
function Pkg1_Func1 return Boolean;
function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural;
package Pkg1_Pkg1 is
procedure Pkg1_Pkg1_Proc1;
end Pkg1_Pkg1;
task type Task_Type is
entry Entry1;
entry Entry2 (I : Integer);
end;
private
type Private_T is
record
Z : Integer;
W : Boolean;
end record;
end Pkg1;
package body Pkg1 is
procedure Pkg1_Proc1 is
begin
null;
end;
package body Inner1 is
procedure Private_T is
begin
null;
end;
end Inner1;
package body Inner2 is
task body Private_T is
begin
loop
null;
end loop;
end;
end Inner2;
task body Task_Type is
begin
select
accept Entry1 do
null;
end;
or
accept Entry2 (I : Integer) do
null;
end;
end select;
end;
procedure Pkg1_Proc2 (I : Integer) is
begin
null;
end Pkg1_Proc2;
function Pkg1_Func1 return Boolean is separate;
function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural is
begin
return 1;
end;
package body Pkg1_Pkg1 is separate;
end Pkg1;
separate (Pkg1)
package body Pkg1_Pkg1 is
procedure Pkg1_Pkg1_Proc1 is
begin
null;
end;
end Pkg1_Pkg1;
separate (Pkg1)
function Pkg1_Func1 return Boolean is
begin
return False;
end;
-- from now on, this is Ada 95 specific.
package Truc is
I : Integer;
end Truc;
package Truc.Bidule is
protected Bidule is
entry Basar;
end Bidule;
protected type Machin_T is
entry Truc;
end Machin_T;
end Truc.Bidule;
package body Truc.Bidule is
protected body Bidule is
entry Basar is
begin
null;
end;
end Bidule;
protected Machin_T is
entry Truc is
begin
null;
end;
end Machin_T;
end Truc.Bidule;
-- This file is an Ada file containing test data
-- for etags (Ada83 and Ada95 support).
package Pkg1 is
type Private_T is private;
package Inner1 is
procedure Private_T;
end Inner1;
package Inner2 is
task Private_T;
end Inner2;
type Public_T is
record
A : Integer;
B : Integer;
end record;
procedure Pkg1_Proc1;
procedure Pkg1_Proc2 (I : Integer);
function Pkg1_Func1 return Boolean;
function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural;
package Pkg1_Pkg1 is
procedure Pkg1_Pkg1_Proc1;
end Pkg1_Pkg1;
task type Task_Type is
entry Entry1;
entry Entry2 (I : Integer);
end;
private
type Private_T is
record
Z : Integer;
W : Boolean;
end record;
end Pkg1;
package body Pkg1 is
procedure Pkg1_Proc1 is
begin
null;
end;
package body Inner1 is
procedure Private_T is
begin
null;
end;
end Inner1;
package body Inner2 is
task body Private_T is
begin
loop
null;
end loop;
end;
end Inner2;
task body Task_Type is
begin
select
accept Entry1 do
null;
end;
or
accept Entry2 (I : Integer) do
null;
end;
end select;
end;
procedure Pkg1_Proc2 (I : Integer) is
begin
null;
end Pkg1_Proc2;
function Pkg1_Func1 return Boolean is separate;
function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural is
begin
return 1;
end;
package body Pkg1_Pkg1 is separate;
end Pkg1;
separate (Pkg1)
package body Pkg1_Pkg1 is
procedure Pkg1_Pkg1_Proc1 is
begin
null;
end;
end Pkg1_Pkg1;
separate (Pkg1)
function Pkg1_Func1 return Boolean is
begin
return False;
end;
-- from now on, this is Ada 95 specific.
package Truc is
I : Integer;
end Truc;
with Pkg1;
package Truc.Bidule is
use type Pkg1.Public_T;
use Pkg1;
use
type Pkg1.Public_T;
use -- comment
type -- comment
Pkg1.Public_T;
protected Bidule is
entry Basar;
private
Ok : Boolean;
end Bidule;
protected type Machin_T is
entry Truc;
private
Ok : Boolean;
end Machin_T;
end Truc.Bidule;
package body Truc.Bidule is
protected body Bidule is
entry Basar when Ok is
begin
null;
end;
end Bidule;
protected body Machin_T is
entry Truc when Ok is
begin
null;
end;
end Machin_T;
end Truc.Bidule;
#define this that
#line 33 "../c/c.web"
#define questo quello
This diff is collapsed.
T f(){if(x){}
}T i;
// The next two functions must be kept together
void bar() {while(0) {}}
int foobar() {;}
struct interface *
interface_locate(void)
{ return 0; }
#line 123 "c.c"
// 7.4: string literal in #line directive shall be a character string
// literal.
//E t_6_062.cpp(21): warning: ill formed #line directive: 123 L"wide"
#line 123 L"wide.c"
#line 123 L"wide.c"
#line 123L"wide.c"
void (*fa) (void);
void (__attribute__((noreturn)) *fb) (void);
extern int
my_printf (void *my_object, const char *my_format, ...)
__attribute__ ((format (printf, 2, 3)));
void fatala () __attribute__ ((noreturn));
void fatalb ();
max (int a, int b)
{ if (a > b) return a; else return b; }
struct bar {
char z;
struct foo f;
};
__attribute__ ((always_inline)) max (int a, int b)
{ if (a > b) return a; else return b }
extern int old_var __attribute__ ((deprecated));
struct foo
{
char a;
int x[2] __attribute__ ((packed));
};
char stack[10000] __attribute__ ((section ("STACK"))) = { 0 };
struct S { short f[3]; } __attribute__ ((aligned (8)));
typedef union
{
int *__ip;
union wait *__up;
} wait_status_ptr_t __attribute__ ((__transparent_union__));
Some_Class A __attribute__ ((init_priority (2000)));
typedef T1 T3 __attribute__ ((deprecated));
T3 z __attribute__ ((deprecated));
typedef int more_aligned_int __attribute__ ((aligned (8)));
struct S __attribute__ ((vector_size (16))) foo;
int foo __attribute__ ((vector_size (16)));
char *__attribute__((aligned(8))) *f;
int i __attribute__ ((visibility ("hidden")));
extern void foobar (void) __attribute__ ((section ("bar")));
typedef struct cacheLRUEntry_s
{
U16 next;
U16 prev;
}
__attribute__ ((packed)) cacheLRUEntry_t;
struct foo {
int x;
char a, b, c, d;
} __attribute__((packed));
void __attribute__ ((visibility ("protected")))
f1 () { /* Do something. */; }
void f2 () { /* Do something. */; }
__attribute__((noreturn)) void d0 (void),
__attribute__((format(printf, 1, 2))) d1 (const char *, ...),
d2 (void);
int x __attribute__ ((aligned (16))) = 0;
struct foo { int x[2] __attribute__ ((aligned (8))); };
short array[3] __attribute__ ((aligned));
asm(" section 10");
int f
() {}
DEAFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0,
"name.")
(name, defalt)
Lisp_Object name, defalt;
{
unsigned char *nm;
}
XDEFUN ("x-get-selection-internal", Fx_get_selection_internal,
Sx_get_selection_internal, 2, 2, 0, "")
{}
DEFUN ("x-get-selection-internal", Fx_get_selection_internal,
Sx_get_selection_internal, 2, 2, 0, "")
{}
/* The next two are not tagged correctly. To prevent this, the code in
Emacs should contain the two first args of DEFUN on the same line. */
DEFUN ("x-get-selection-internal",
Fx_get_selection_internal, Sx_get_selection_internal, 2, 2, 0, "")
{}
DEFUN
("y-get-selection-internal",
Fy_get_selection_internal, Sy_get_selection_internal, 2, 2, 0, "")
{}
defun_func1()
{}
DEFUN_func2()
{}
typedef int bool;
bool funcboo ()
{}
static void (*lang_func) () = NULL;
struct my_struct {
};
typedef struct my_struct my_typedef;
int bla ()
{
PrkList ExistingOperations =
ProcedureOperationSelections(PrkNull, CalledFromDomain);
}
a()
b c;
{}
int func1