diff options
| author | john muhl | 2025-03-21 12:15:02 -0500 |
|---|---|---|
| committer | Po Lu | 2025-08-25 09:59:04 +0800 |
| commit | c5656af2ff5f2ee4a683540db792ccece6db4e43 (patch) | |
| tree | dd0eaaab38f36e99b9613854243da73bb5a906bd /test/lisp/progmodes/lua-mode-resources/hide-show.lua | |
| parent | 38a07757425c711e037c526f2c76d342a81e7c17 (diff) | |
| download | emacs-c5656af2ff5f2ee4a683540db792ccece6db4e43.tar.gz emacs-c5656af2ff5f2ee4a683540db792ccece6db4e43.zip | |
; Add tests for 'lua-mode'
* test/lisp/progmodes/lua-mode-resources/font-lock.lua:
* test/lisp/progmodes/lua-mode-resources/hide-show.lua:
* test/lisp/progmodes/lua-mode-resources/indent.erts:
* test/lisp/progmodes/lua-mode-resources/movement.erts:
* test/lisp/progmodes/lua-mode-resources/which-function.lua:
* test/lisp/progmodes/lua-mode-tests.el: New file.
Diffstat (limited to 'test/lisp/progmodes/lua-mode-resources/hide-show.lua')
| -rw-r--r-- | test/lisp/progmodes/lua-mode-resources/hide-show.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/lisp/progmodes/lua-mode-resources/hide-show.lua b/test/lisp/progmodes/lua-mode-resources/hide-show.lua new file mode 100644 index 00000000000..a23b46437bf --- /dev/null +++ b/test/lisp/progmodes/lua-mode-resources/hide-show.lua | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | --[[ | ||
| 2 | This is a | ||
| 3 | comment block. | ||
| 4 | ]] | ||
| 5 | local function fun () | ||
| 6 | print("fun") | ||
| 7 | end | ||
| 8 | local f = (function () | ||
| 9 | print(1) | ||
| 10 | end) | ||
| 11 | for i = 1, 10 do | ||
| 12 | print(i) | ||
| 13 | end | ||
| 14 | repeat | ||
| 15 | print("repeat") | ||
| 16 | until false | ||
| 17 | while true do | ||
| 18 | print("while") | ||
| 19 | end | ||
| 20 | do | ||
| 21 | print(1) | ||
| 22 | end | ||
| 23 | if true then | ||
| 24 | print(1) | ||
| 25 | elseif false then | ||
| 26 | print(0) | ||
| 27 | else | ||
| 28 | print(0) | ||
| 29 | end | ||
| 30 | function f1 (has, | ||
| 31 | lots, | ||
| 32 | of, | ||
| 33 | parameters) | ||
| 34 | print("ok") | ||
| 35 | end | ||