summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlu4nx <lx@shellcodes.org>2016-01-30 14:56:43 +0200
committerEli Zaretskii <eliz@gnu.org>2016-01-30 14:56:43 +0200
commit40a85fba441aa69d47ef9efd645df3411e43ae21 (patch)
tree036fafebce750bb4083bbef7edf3ac0910c903c3 /test
parent25b79d7bc71079cd6ebb2700623e7e3b76b03287 (diff)
downloademacs-40a85fba441aa69d47ef9efd645df3411e43ae21.tar.gz
Support Go language in 'etags'
* lib-src/etags.c <Ruby_help>: Fix documentation of Ruby tags. <Go_help>: New help. <Go_suffixes>: New variable. (Go_functions): New function. <lang_names>: Add entry for Go. (Bug#22370) * doc/emacs/maintaining.texi (Tag Syntax): Document Go support. * doc/man/etags.1: Mention Go support. * etc/NEWS: Mention Go support. * test/etags/go-src/test.go: * test/etags/go-src/test1.go: New test files. * test/etags/Makefile (GOSRC): New variable. (SRCS): Add $(GOSRC). * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to addition of Go tests.
Diffstat (limited to 'test')
-rw-r--r--test/etags/CTAGS.good11
-rw-r--r--test/etags/ETAGS.good_112
-rw-r--r--test/etags/ETAGS.good_212
-rw-r--r--test/etags/ETAGS.good_315
-rw-r--r--test/etags/ETAGS.good_412
-rw-r--r--test/etags/ETAGS.good_515
-rw-r--r--test/etags/ETAGS.good_615
-rw-r--r--test/etags/Makefile7
-rw-r--r--test/etags/go-src/test.go11
-rw-r--r--test/etags/go-src/test1.go34
10 files changed, 141 insertions, 3 deletions
diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good
index 86eb9f85cf3..846725ef713 100644
--- a/test/etags/CTAGS.good
+++ b/test/etags/CTAGS.good
@@ -947,6 +947,10 @@ MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/
MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/
MoveLayerBottom lua-src/allegro.lua /^function MoveLayerBottom ()$/
MoveLayerTop lua-src/allegro.lua /^function MoveLayerTop ()$/
+Mtest.go go-src/test.go 1
+Mtest.go go-src/test.go /^func main() {$/
+Mtest1.go go-src/test1.go 1
+Mtest1.go go-src/test1.go /^func main() {$/
Mx.cc cp-src/x.cc /^main(int argc, char *argv[])$/
NAME y-src/cccp.c 8
NATNUMP c-src/emacs/src/lisp.h /^NATNUMP (Lisp_Object x)$/
@@ -1077,6 +1081,8 @@ Pkg1_Proc2/p ada-src/waroquiers.ada /^ procedure Pkg1_Proc2 (I : Integer);$/
Pkg1_Proc2/p ada-src/waroquiers.ada /^ procedure Pkg1_Proc2 (I : Integer) is$/
PostControls pyt-src/server.py /^ def PostControls(self):$/
Pre_Call_State/t ada-src/2ataspri.ads /^ type Pre_Call_State is new System.Address;$/
+PrintAdd go-src/test1.go /^func (s str) PrintAdd() {$/
+PrintAdd go-src/test1.go /^func (n intNumber) PrintAdd() {$/
Private objc-src/Subprocess.m /^@interface Subprocess(Private)$/
Private_T/b ada-src/etags-test-for.ada /^ task body Private_T is$/
Private_T/b ada-src/waroquiers.ada /^ task body Private_T is$/
@@ -3135,6 +3141,7 @@ instance_method_question? ruby-src/test.rb /^ def instance_method_questio
instr y-src/parse.y 80
instr parse.y 80
instruct c-src/etags.c 2527
+intNumber go-src/test1.go 13
integer c-src/emacs/src/lisp.h 2127
integer cccp.y 113
integer y-src/cccp.y 112
@@ -3738,6 +3745,7 @@ plain_C_suffixes c-src/etags.c 643
plainc c-src/etags.c 2934
plist c-src/emacs/src/lisp.h 697
plus cp-src/functions.cpp /^void Date::plus ( int days , int month , int year /
+plus go-src/test1.go 5
plusvalseq prol-src/natded.prolog /^plusvalseq([]) --> [].$/
pointer c-src/emacs/src/lisp.h 2125
poll_for_input c-src/emacs/src/keyboard.c /^poll_for_input (struct atimer *timer)$/
@@ -3950,6 +3958,7 @@ save_getcjmp c-src/emacs/src/keyboard.c /^save_getcjmp (sys_jmp_buf temp)$/
save_type c-src/emacs/src/lisp.h /^save_type (struct Lisp_Save_Value *v, int n)$/
savenstr c-src/etags.c /^savenstr (const char *cp, int len)$/
savestr c-src/etags.c /^savestr (const char *cp)$/
+say go-src/test.go /^func say(msg string) {$/
scan_separators c-src/etags.c /^scan_separators (char *name)$/
scolonseen c-src/etags.c 2447
scratch c-src/sysdep.h 56
@@ -4075,6 +4084,7 @@ step cp-src/clheir.hpp /^ virtual void step(void) { }$/
step_everybody cp-src/clheir.cpp /^void step_everybody(void)$/
stop_polling c-src/emacs/src/keyboard.c /^stop_polling (void)$/
store_user_signal_events c-src/emacs/src/keyboard.c /^store_user_signal_events (void)$/
+str go-src/test1.go 9
strcaseeq c-src/etags.c /^#define strcaseeq(s,t) (assert ((s)!=NULL && (t)!=/
streq c-src/etags.c /^#define streq(s,t) (assert ((s)!=NULL || (t)!=NULL/
string_intervals c-src/emacs/src/lisp.h /^string_intervals (Lisp_Object s)$/
@@ -4217,6 +4227,7 @@ terminateInput objc-src/Subprocess.m /^- terminateInput$/
test c-src/emacs/src/lisp.h 1871
test cp-src/c.C 86
test erl-src/gs_dialog.erl /^test() ->$/
+test go-src/test1.go /^func test(p plus) {$/
test php-src/ptest.php /^test $/
test.me22b lua-src/test.lua /^ local function test.me22b (one)$/
test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/
diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1
index 44ac091066b..c7b122111c4 100644
--- a/test/etags/ETAGS.good_1
+++ b/test/etags/ETAGS.good_1
@@ -2283,6 +2283,18 @@ constant (a-forth-constant(a-forth-constant38,628
code assemby-code-word 43,685
: a-forth-word 50,870
+go-src/test.go,48
+package main1,0
+func say(5,28
+func main(9,72
+
+go-src/test1.go,119
+package main1,0
+func (s str) PrintAdd(17,136
+func (n intNumber) PrintAdd(21,189
+func test(25,248
+func main(29,285
+
html-src/softwarelibero.html,200
Cos'è il software libero?4,38
Licenze d'uso di un programmalicenze65,2500
diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2
index 8a93e3b0656..8d0f33824a4 100644
--- a/test/etags/ETAGS.good_2
+++ b/test/etags/ETAGS.good_2
@@ -2852,6 +2852,18 @@ constant (a-forth-constant(a-forth-constant38,628
code assemby-code-word 43,685
: a-forth-word 50,870
+go-src/test.go,48
+package main1,0
+func say(5,28
+func main(9,72
+
+go-src/test1.go,119
+package main1,0
+func (s str) PrintAdd(17,136
+func (n intNumber) PrintAdd(21,189
+func test(25,248
+func main(29,285
+
html-src/softwarelibero.html,200
Cos'è il software libero?4,38
Licenze d'uso di un programmalicenze65,2500
diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3
index e575b40ab0d..060389c6232 100644
--- a/test/etags/ETAGS.good_3
+++ b/test/etags/ETAGS.good_3
@@ -2600,6 +2600,21 @@ constant (a-forth-constant(a-forth-constant38,628
code assemby-code-word 43,685
: a-forth-word 50,870
+go-src/test.go,48
+package main1,0
+func say(5,28
+func main(9,72
+
+go-src/test1.go,172
+package main1,0
+type plus 5,28
+type str 9,65
+type intNumber 13,99
+func (s str) PrintAdd(17,136
+func (n intNumber) PrintAdd(21,189
+func test(25,248
+func main(29,285
+
html-src/softwarelibero.html,200
Cos'è il software libero?4,38
Licenze d'uso di un programmalicenze65,2500
diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4
index 28258060517..40404f9fc6e 100644
--- a/test/etags/ETAGS.good_4
+++ b/test/etags/ETAGS.good_4
@@ -2447,6 +2447,18 @@ constant (a-forth-constant(a-forth-constant38,628
code assemby-code-word 43,685
: a-forth-word 50,870
+go-src/test.go,48
+package main1,0
+func say(5,28
+func main(9,72
+
+go-src/test1.go,119
+package main1,0
+func (s str) PrintAdd(17,136
+func (n intNumber) PrintAdd(21,189
+func test(25,248
+func main(29,285
+
html-src/softwarelibero.html,200
Cos'è il software libero?4,38
Licenze d'uso di un programmalicenze65,2500
diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5
index 35bb353c767..432819d3b32 100644
--- a/test/etags/ETAGS.good_5
+++ b/test/etags/ETAGS.good_5
@@ -3333,6 +3333,21 @@ constant (a-forth-constant(a-forth-constant38,628
code assemby-code-word 43,685
: a-forth-word 50,870
+go-src/test.go,48
+package main1,0
+func say(5,28
+func main(9,72
+
+go-src/test1.go,172
+package main1,0
+type plus 5,28
+type str 9,65
+type intNumber 13,99
+func (s str) PrintAdd(17,136
+func (n intNumber) PrintAdd(21,189
+func test(25,248
+func main(29,285
+
html-src/softwarelibero.html,200
Cos'è il software libero?4,38
Licenze d'uso di un programmalicenze65,2500
diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6
index 8add300784f..4ad5d76db27 100644
--- a/test/etags/ETAGS.good_6
+++ b/test/etags/ETAGS.good_6
@@ -3333,6 +3333,21 @@ constant (a-forth-constant(a-forth-constant38,628
code assemby-code-word 43,685
: a-forth-word 50,870
+go-src/test.go,48
+package main1,0
+func say(5,28
+func main(9,72
+
+go-src/test1.go,172
+package main1,0
+type plus 5,28
+type str 9,65
+type intNumber 13,99
+func (s str) PrintAdd(17,136
+func (n intNumber) PrintAdd(21,189
+func test(25,248
+func main(29,285
+
html-src/softwarelibero.html,200
Cos'è il software libero?4,38
Licenze d'uso di un programmalicenze65,2500
diff --git a/test/etags/Makefile b/test/etags/Makefile
index 00d5b9f52b2..21a77eb0c5d 100644
--- a/test/etags/Makefile
+++ b/test/etags/Makefile
@@ -11,6 +11,7 @@ ELSRC=$(addprefix ./el-src/,TAGTEST.EL emacs/lisp/progmodes/etags.el)
ERLSRC=$(addprefix ./erl-src/,gs_dialog.erl)
FORTHSRC=$(addprefix ./forth-src/,test-forth.fth)
FSRC=$(addprefix ./f-src/,entry.for entry.strange_suffix entry.strange)
+GOSRC=$(addprefix ./go-src/,test.go test1.go)
HTMLSRC=$(addprefix ./html-src/,softwarelibero.html index.shtml algrthms.html software.html)
#JAVASRC=$(addprefix ./java-src/, )
LUASRC=$(addprefix ./lua-src/,allegro.lua test.lua)
@@ -27,9 +28,9 @@ RBSRC=$(addprefix ./ruby-src/,test.rb test1.ruby)
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=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\
- ${FORTHSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC} ${OBJCSRC}\
- ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC} ${PROLSRC} ${PYTSRC}\
- ${RBSRC} ${TEXSRC} ${YSRC}
+ ${FORTHSRC} ${GOSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC}\
+ ${OBJCSRC} ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC}\
+ ${PROLSRC} ${PYTSRC} ${RBSRC} ${TEXSRC} ${YSRC}
NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz
ETAGS_PROG=../../lib-src/etags
diff --git a/test/etags/go-src/test.go b/test/etags/go-src/test.go
new file mode 100644
index 00000000000..6aea26ef210
--- /dev/null
+++ b/test/etags/go-src/test.go
@@ -0,0 +1,11 @@
+package main
+
+import "fmt"
+
+func say(msg string) {
+ fmt.Println(msg)
+}
+
+func main() {
+ say("Hello, Emacs!")
+}
diff --git a/test/etags/go-src/test1.go b/test/etags/go-src/test1.go
new file mode 100644
index 00000000000..6d1efaaa8a9
--- /dev/null
+++ b/test/etags/go-src/test1.go
@@ -0,0 +1,34 @@
+package main
+
+import "fmt"
+
+type plus interface {
+ PrintAdd()
+}
+
+type str struct {
+ a, b string
+}
+
+type intNumber struct {
+ a, b int
+}
+
+func (s str) PrintAdd() {
+ fmt.Println(s.a + s.b)
+}
+
+func (n intNumber) PrintAdd() {
+ fmt.Println(n.a + n.b)
+}
+
+func test(p plus) {
+ p.PrintAdd()
+}
+
+func main() {
+ s := str{a: "Hello,", b: "Emacs!"}
+ number := intNumber{a: 1, b: 2}
+ test(number)
+ test(s)
+}