[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode e430d01 252/468: Remove deprecated test code from
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode e430d01 252/468: Remove deprecated test code from test/, put current code there instead |
Date: |
Thu, 5 Aug 2021 04:58:47 -0400 (EDT) |
branch: elpa/lua-mode
commit e430d01440cf6a2b4b29f3c2af7754ca6863ba57
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
Remove deprecated test code from test/, put current code there instead
---
Makefile | 18 ++---
{ert-tests => test}/ert.el | 0
test/indentation/README.md | 16 -----
test/indentation/basic_blocks.lua | 45 ------------
test/indentation/basic_blocks.lua.etalon | 45 ------------
test/indentation/test_indentation.sh | 84 -----------------------
{ert-tests => test}/lua-font-lock-test-helpers.el | 0
{ert-tests => test}/test-builtin-font-lock.el | 0
{ert-tests => test}/test-defun-font-lock.el | 0
{ert-tests => test}/test-electric-mode.el | 0
{ert-tests => test}/test-indentation.el | 0
{ert-tests => test}/test-strings-and-comments.el | 0
12 files changed, 9 insertions(+), 199 deletions(-)
diff --git a/Makefile b/Makefile
index 1a7407c..301724a 100644
--- a/Makefile
+++ b/Makefile
@@ -9,11 +9,11 @@ EMACS?=emacs
EMACS_BATCH=cask exec $(EMACS) --batch -Q
TESTS=
-TESTS += ert-tests/test-defun-font-lock.el
-TESTS += ert-tests/test-builtin-font-lock.el
-TESTS += ert-tests/test-electric-mode.el
-TESTS += ert-tests/test-indentation.el
-TESTS += ert-tests/test-strings-and-comments.el
+TESTS += test/test-defun-font-lock.el
+TESTS += test/test-builtin-font-lock.el
+TESTS += test/test-electric-mode.el
+TESTS += test/test-indentation.el
+TESTS += test/test-strings-and-comments.el
default:
@echo version is $(VERSION)
@@ -30,13 +30,13 @@ dist:
test: test-compiled test-uncompiled
test-compiled: compile
- $(EMACS_BATCH) -l ert-tests/ert.el \
- -l lua-mode.elc -l ert-tests/lua-font-lock-test-helpers.el \
+ $(EMACS_BATCH) -l test/ert.el \
+ -l lua-mode.elc -l test/lua-font-lock-test-helpers.el \
$(addprefix -l ,$(TESTS)) -f ert-run-tests-batch-and-exit
test-uncompiled:
- $(EMACS_BATCH) -l ert-tests/ert.el \
- -l lua-mode.el -l ert-tests/lua-font-lock-test-helpers.el \
+ $(EMACS_BATCH) -l test/ert.el \
+ -l lua-mode.el -l test/lua-font-lock-test-helpers.el \
$(addprefix -l ,$(TESTS)) -f ert-run-tests-batch-and-exit
release:
diff --git a/ert-tests/ert.el b/test/ert.el
similarity index 100%
rename from ert-tests/ert.el
rename to test/ert.el
diff --git a/test/indentation/README.md b/test/indentation/README.md
deleted file mode 100644
index 532eca1..0000000
--- a/test/indentation/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-This directory contains files used to test lua-mode indentation engine. Test
-input is stored in `*.lua` files which are compared to their respective etalon
-files `*.lua.etalon`.
-
-To run all tests, do
-```
-$ ./test_indentation.sh *.lua
-```
-
-Feel free to add your own tricky cases, if you don't see them here, no specific
-guidelines here, just try to bundle them logically into several bigger files.
-
-Additional lua-mode customization may be performed on a file basis with the use
-of [emacs file variables].
-
-[emacs file variables]:
http://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html
diff --git a/test/indentation/basic_blocks.lua
b/test/indentation/basic_blocks.lua
deleted file mode 100644
index 2131dbc..0000000
--- a/test/indentation/basic_blocks.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-do
-a = 2
-c = 5
-end
-
-if good then
-do_good()
-elseif bad then
-do_bad()
-else
-do_nothing()
-really_do_nothing()
-end
-
-while true do
-sun.rise_in_the_east()
-end
-
-repeat
-host.offer_hot_beverage(guest)
-until guest.good
-
-for i,v in ipairs(base) do
-take(base)
-end
-
-function fact(i)
-if i == 0 then
-return 1
-else
-if i == 1 then
-return 1
-else
-if i == 2 then
-return 2
-else
-fact = 2
-for n=3,i do
-fact = fact * n
-end
-return fact
-end
-end
-end
-end
diff --git a/test/indentation/basic_blocks.lua.etalon
b/test/indentation/basic_blocks.lua.etalon
deleted file mode 100644
index 51fa544..0000000
--- a/test/indentation/basic_blocks.lua.etalon
+++ /dev/null
@@ -1,45 +0,0 @@
-do
- a = 2
- c = 5
-end
-
-if good then
- do_good()
-elseif bad then
- do_bad()
-else
- do_nothing()
- really_do_nothing()
-end
-
-while true do
- sun.rise_in_the_east()
-end
-
-repeat
- host.offer_hot_beverage(guest)
-until guest.good
-
-for i,v in ipairs(base) do
- take(base)
-end
-
-function fact(i)
- if i == 0 then
- return 1
- else
- if i == 1 then
- return 1
- else
- if i == 2 then
- return 2
- else
- fact = 2
- for n=3,i do
- fact = fact * n
- end
- return fact
- end
- end
- end
-end
diff --git a/test/indentation/test_indentation.sh
b/test/indentation/test_indentation.sh
deleted file mode 100755
index 040faeb..0000000
--- a/test/indentation/test_indentation.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-
-# This script can be used to test lua-mode indentation engine. For a slightly
-# longer description, run it without parameters and consult the output.
-
-# Need to preserve input arguments, because subshells overwrite them
-declare -a PARAMS
-PARAMS=( "$@" )
-
-set ${EMACS=emacs}
-set ${LUA_MODE=$(dirname $0)/../../lua-mode.el}
-
-if [ ${#PARAMS[@]} -eq 0 ]; then
- cat <<EOF
-Usage: `basename $0` <FILE> [ <FILE> ... ]
-
-Test lua-mode indentation: each FILE is checked to be indented as FILE.etalon.
-The following environment variables are considered:
-
- - EMACS (default value: emacs)
- specify emacs version to be run
-
- - LUA_MODE (default value: $(readlink -m $(dirname $0)/../lua-mode.el))
- specify location where tested lua-mode.el resides
-EOF
- exit 1
-fi
-
-# All output will be redirected into ERROR_LOG temporary file to make sure
-# that if everything goes ok, the script will remain silent. In case of an
-# error, ERROR_LOG contents may be retrieved and printed onto the screen.
-ERROR_LOG=`mktemp` || { echo "can't create tempfile"; exit 1; }
-exec 6<>"$ERROR_LOG"
-unlink "$ERROR_LOG"
-ERROR_LOG=/proc/$$/fd/6
-
-OUTPUT=`mktemp` || { echo "can't create temporary output file"; exit 1; }
-exec 7<>"$OUTPUT"
-unlink "$OUTPUT"
-OUTPUT=/proc/$$/fd/7
-
-test_file_indentation() {
- INPUT="$1"
- ETALON="$INPUT.etalon"
-
- echo -n "Testing $INPUT... "
-
- test -f "$INPUT" || { echo "input file '$INPUT' not exists or not a
file"; return 1; }
- test -f "$ETALON" || { echo "etalon file '$ETALON' not exists or not a
file"; return 1; }
-
-# run emacs with lua-mode and indent input file
-# disable backup file creation to prevent emacs from trying to write to procfs
- $EMACS --quick --batch \
- --load $LUA_MODE \
- --eval "(setq make-backup-files nil)" \
- --eval "\
-(with-temp-buffer
- ;; lua-mode indents by 3s, that's not even a multiple of tab width (4/8)
- (set-default 'indent-tabs-mode nil) \
- (insert-file-contents \"$INPUT\")
- (lua-mode)
-
- ;; permit unsafe (e.g. lua-*) local variables and read them
- (setq enable-local-variables :all)
- (hack-local-variables)
-
- (indent-region (point-min) (point-max))
- (write-file \"$OUTPUT\"))" \
- > $ERROR_LOG 2>&1 \
- || { echo "indentation failed (Emacs log):"; cat <$ERROR_LOG ; return 1;
}
-
- diff -u $ETALON $OUTPUT >$ERROR_LOG 2>&1 \
- || { echo "indentation mismatch:"; cat <$ERROR_LOG; return 1; }
-
- echo OK
-}
-
-FAILED=no
-
-for INPUT in "${PARAMS[@]}"; do
- test_file_indentation "$INPUT" || FAILED=yes
-done
-
-test "$FAILED" = "no" || exit 1
diff --git a/ert-tests/lua-font-lock-test-helpers.el
b/test/lua-font-lock-test-helpers.el
similarity index 100%
rename from ert-tests/lua-font-lock-test-helpers.el
rename to test/lua-font-lock-test-helpers.el
diff --git a/ert-tests/test-builtin-font-lock.el
b/test/test-builtin-font-lock.el
similarity index 100%
rename from ert-tests/test-builtin-font-lock.el
rename to test/test-builtin-font-lock.el
diff --git a/ert-tests/test-defun-font-lock.el b/test/test-defun-font-lock.el
similarity index 100%
rename from ert-tests/test-defun-font-lock.el
rename to test/test-defun-font-lock.el
diff --git a/ert-tests/test-electric-mode.el b/test/test-electric-mode.el
similarity index 100%
rename from ert-tests/test-electric-mode.el
rename to test/test-electric-mode.el
diff --git a/ert-tests/test-indentation.el b/test/test-indentation.el
similarity index 100%
rename from ert-tests/test-indentation.el
rename to test/test-indentation.el
diff --git a/ert-tests/test-strings-and-comments.el
b/test/test-strings-and-comments.el
similarity index 100%
rename from ert-tests/test-strings-and-comments.el
rename to test/test-strings-and-comments.el
- [nongnu] elpa/lua-mode c1fcfb6 211/468: Add NEWS file, (continued)
- [nongnu] elpa/lua-mode c1fcfb6 211/468: Add NEWS file, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d0fa50d 217/468: lua-make-delimited-matcher: wrap into eval-and-compile, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b684790 219/468: Revert "Rename lua--function-name-rx, use it in font-lock keywords init", Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8e19d23 231/468: Add basic indentation tests, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6729533 234/468: Rewrite lua-send-buffer function (should fix issue #60), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode afc1ea0 235/468: Send init-code in lua-start-process, enable compilation-shell-minor-mode, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1ede907 242/468: Fix several cases for `indent-new-comment-line' (M-j), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6c55abb 245/468: Add lua-rx/-to-string wrappers to simplify writing Lua-specific regexps, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1452f8e 244/468: should-lua-indent: accept strings rather than lists to simplify writing tests, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a0f3a6f 250/468: Simplify font-lock & imenu regexps with lua-rx, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e430d01 252/468: Remove deprecated test code from test/, put current code there instead,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 1d21a10 259/468: Reorganize test structure, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode dc55356 261/468: lua-forward-regexp: make sure direction is `forward', Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0a986f7 266/468: Add hideshow support for "repeat... until" blocks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8d27d2c 268/468: fixed up tests && improved lua-kill-process, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 82daeb5 297/468: Merge pull request #88 from tarsius/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7b2c18c 305/468: Merge pull request #99 from tarsius/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6f4035a 315/468: Merge pull request #108 from ptrv/patch-1, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode f2915c3 324/468: Add string tab escape test, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 652e299 339/468: gitignore: add cask working dir, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode adb1f3a 334/468: lua_loadstring: fix variables that were made global, Philip Kaludercic, 2021/08/05