From e72dfe96690c98ffe6f91730aa965588967725ae Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 17 May 2021 18:25:08 +0200 Subject: [PATCH] Add an etags test for Rust (bug#46055) --- test/manual/etags/ETAGS.good_1 | 5 +++++ test/manual/etags/Makefile | 3 ++- test/manual/etags/rs-src/test.rs | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test/manual/etags/rs-src/test.rs diff --git a/test/manual/etags/ETAGS.good_1 b/test/manual/etags/ETAGS.good_1 index 508f8493f48..a8470ea1393 100644 --- a/test/manual/etags/ETAGS.good_1 +++ b/test/manual/etags/ETAGS.good_1 @@ -3134,6 +3134,11 @@ module A9,57 alias_method ( :foo2,foo237,586 A::Constant Constant42,655 +rs-src/test.rs,52 +enum IpAddrKind 3,11 +fn test1(8,48 +fn main(12,88 + scm-src/test.scm,260 (define hello 1,0 (set! hello 3,32 diff --git a/test/manual/etags/Makefile b/test/manual/etags/Makefile index c1df703905e..8d56db29b72 100644 --- a/test/manual/etags/Makefile +++ b/test/manual/etags/Makefile @@ -25,13 +25,14 @@ PSSRC=$(addprefix ./ps-src/,rfc1245.ps) PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog) PYTSRC=$(addprefix ./pyt-src/,server.py) RBSRC=$(addprefix ./ruby-src/,test.rb test1.ru) +RSSRC=$(addprefix ./rs-src/,test.rs) SCMSRC=$(addprefix ./scm-src/,test.scm) 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} ${GOSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC}\ ${OBJCSRC} ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC}\ - ${PROLSRC} ${PYTSRC} ${RBSRC} ${SCMSRC} ${TEXSRC} ${YSRC} + ${PROLSRC} ${PYTSRC} ${RBSRC} ${RSSRC} ${SCMSRC} ${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/manual/etags/rs-src/test.rs b/test/manual/etags/rs-src/test.rs new file mode 100644 index 00000000000..081d0d7d4df --- /dev/null +++ b/test/manual/etags/rs-src/test.rs @@ -0,0 +1,14 @@ +mod test; + +enum IpAddrKind { + V4, + V6, +} + +fn test1() { + println!("Testing"); +} + +fn main() { + test::test1(); +} -- 2.39.5