diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-12-11 12:07:26 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-12-11 12:07:26 +0200 |
commit | 3e08f784d1cb8ebd0bd4ff53c1948a65c4924d52 (patch) | |
tree | be175b403909d3207a4e2b97accd905796bda62c /test | |
parent | 9d2b8e768f2015a89f7609dedf7b28ea5e8123b5 (diff) | |
download | emacs-3e08f784d1cb8ebd0bd4ff53c1948a65c4924d52.tar.gz |
Improve Lua support in etags
* lib-src/etags.c (Lua_functions): Skip spaces before looking for
"function".
* etc/NEWS: Mention improved Lua support by 'etags'.
* test/etags/lua-src/test.lua (test): Add tests for indented
function definitions.
* 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 the modified Lua tests.
Diffstat (limited to 'test')
-rw-r--r-- | test/etags/CTAGS.good | 4 | ||||
-rw-r--r-- | test/etags/ETAGS.good_1 | 6 | ||||
-rw-r--r-- | test/etags/ETAGS.good_2 | 6 | ||||
-rw-r--r-- | test/etags/ETAGS.good_3 | 6 | ||||
-rw-r--r-- | test/etags/ETAGS.good_4 | 6 | ||||
-rw-r--r-- | test/etags/ETAGS.good_5 | 6 | ||||
-rw-r--r-- | test/etags/ETAGS.good_6 | 6 | ||||
-rw-r--r-- | test/etags/lua-src/test.lua | 21 |
8 files changed, 55 insertions, 6 deletions
diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index 3186ff667e2..245f6703adf 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -3425,6 +3425,8 @@ mcCSC cp-src/c.C 6 mcheck c-src/emacs/src/gmalloc.c /^mcheck (void (*func) (enum mcheck_status))$/ mcheck_status c-src/emacs/src/gmalloc.c 283 mcheck_used c-src/emacs/src/gmalloc.c 2012 +me22b lua-src/test.lua /^ local function test.me22b (one)$/ +me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ memalign c-src/emacs/src/gmalloc.c /^memalign (size_t alignment, size_t size)$/ member prol-src/natded.prolog /^member(X,[X|_]).$/ memclear c-src/emacs/src/lisp.h /^memclear (void *p, ptrdiff_t nbytes)$/ @@ -4209,6 +4211,8 @@ test c-src/emacs/src/lisp.h 1871 test cp-src/c.C 86 test erl-src/gs_dialog.erl /^test() ->$/ 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)$/ test_undefined c-src/emacs/src/keyboard.c /^test_undefined (Lisp_Object binding)$/ texttreelist prol-src/natded.prolog /^texttreelist([]).$/ this c-src/a/b/b.c 1 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 1c4664d47a8..2ae4ec41256 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -2336,7 +2336,7 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 -lua-src/test.lua,291 +lua-src/test.lua,442 function Rectangle.getPos 2,15 function Rectangle.getPos getPos2,15 function Circle.getPos 6,61 @@ -2345,6 +2345,10 @@ function Cube.data.getFoo 10,102 function Cube.data.getFoo getFoo10,102 function Square.something:Bar 14,148 function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 make-src/Makefile,1133 LATEST=1,0 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 5f82e8c6b1c..3ec5b21d384 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -2905,7 +2905,7 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 -lua-src/test.lua,291 +lua-src/test.lua,442 function Rectangle.getPos 2,15 function Rectangle.getPos getPos2,15 function Circle.getPos 6,61 @@ -2914,6 +2914,10 @@ function Cube.data.getFoo 10,102 function Cube.data.getFoo getFoo10,102 function Square.something:Bar 14,148 function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 make-src/Makefile,1156 LATEST=1,0 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 8ab9dc37482..43b84eed5d2 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -2653,7 +2653,7 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 -lua-src/test.lua,291 +lua-src/test.lua,442 function Rectangle.getPos 2,15 function Rectangle.getPos getPos2,15 function Circle.getPos 6,61 @@ -2662,6 +2662,10 @@ function Cube.data.getFoo 10,102 function Cube.data.getFoo getFoo10,102 function Square.something:Bar 14,148 function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 make-src/Makefile,1133 LATEST=1,0 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 39a2f6efe74..434fe13cbd4 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -2500,7 +2500,7 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 -lua-src/test.lua,291 +lua-src/test.lua,442 function Rectangle.getPos 2,15 function Rectangle.getPos getPos2,15 function Circle.getPos 6,61 @@ -2509,6 +2509,10 @@ function Cube.data.getFoo 10,102 function Cube.data.getFoo getFoo10,102 function Square.something:Bar 14,148 function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 make-src/Makefile,1133 LATEST=1,0 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index a820d81208a..425e2526f35 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -3386,7 +3386,7 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 -lua-src/test.lua,291 +lua-src/test.lua,442 function Rectangle.getPos 2,15 function Rectangle.getPos getPos2,15 function Circle.getPos 6,61 @@ -3395,6 +3395,10 @@ function Cube.data.getFoo 10,102 function Cube.data.getFoo getFoo10,102 function Square.something:Bar 14,148 function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 make-src/Makefile,1156 LATEST=1,0 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index c3051470441..39522dbdb9b 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -3386,7 +3386,7 @@ function MoveLayerBottom 223,5079 function MoveLayerBefore 236,5457 function MoveLayerAfter 258,6090 -lua-src/test.lua,291 +lua-src/test.lua,442 function Rectangle.getPos 2,15 function Rectangle.getPos getPos2,15 function Circle.getPos 6,61 @@ -3395,6 +3395,10 @@ function Cube.data.getFoo 10,102 function Cube.data.getFoo getFoo10,102 function Square.something:Bar 14,148 function Square.something:Bar Bar14,148 + function test.me_22a(22,241 + function test.me_22a(me_22a22,241 + local function test.me22b 25,297 + local function test.me22b me22b25,297 make-src/Makefile,1156 LATEST=1,0 diff --git a/test/etags/lua-src/test.lua b/test/etags/lua-src/test.lua index 3bfa49c4f5d..405eb5f1de0 100644 --- a/test/etags/lua-src/test.lua +++ b/test/etags/lua-src/test.lua @@ -13,3 +13,24 @@ end Square = {} function Square.something:Bar () end + +-- Comment line + -- Indented comment line + +test = {} + + function test.me_22a(one, two) + print"me_22a" + end + local function test.me22b (one) + print"me_22b" + end + + + test.i_123 = function (x) + print"i_123" +end + + +test.me_12a(1,2) +test.i_123(1) |