aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Wainwright <josh.wainwright@ldra.com>2016-04-21 09:11:37 +0100
committerJosh Wainwright <josh.wainwright@ldra.com>2016-04-21 09:11:37 +0100
commit7c9a06750fb91cf7895ab6833cc5b64ce7120c8b (patch)
tree42d9c2febf0bef2b061590c64c4ee1deb75a8b0e
parentbe9765e0e920b1f23f71b4b35362c6e1767c13f9 (diff)
downloadvis-7c9a06750fb91cf7895ab6833cc5b64ce7120c8b.tar.gz
vis-7c9a06750fb91cf7895ab6833cc5b64ce7120c8b.tar.xz
Update tests README and add lua tests README files
-rw-r--r--README.md3
-rw-r--r--lua/README.md21
2 files changed, 23 insertions, 1 deletions
diff --git a/README.md b/README.md
index 06bc403..05fd644 100644
--- a/README.md
+++ b/README.md
@@ -5,10 +5,11 @@ This repository contains testing infrastructure for the
[vis editor](https://github.com/martanne/vis). It is expected
to be cloned into a sub directory of the `vis` source tree.
-There exist 3 different kinds of tests:
+There exist 4 different kinds of tests:
* `core` are C unit tests for core data structures used by vis
* `vim` tests vim compatibility
* `vis` contains tests for vis specific behavior/features
+ * `lua` contains tests for the vis specific lua api
Run `make` to execute all test suites.
diff --git a/lua/README.md b/lua/README.md
new file mode 100644
index 0000000..9b19a83
--- /dev/null
+++ b/lua/README.md
@@ -0,0 +1,21 @@
+Tests for vis specific lua api
+------------------------------
+
+There are two types of lua tests here:
+
+1. Tests are formed from a `<test>.in`, `<test>.ref` and `<test>.out` triplet.
+ The `<test>.in` file is opened by vis, some operatations are performed and
+ the modified file is written to `<test>.out`. The new `<test>.out` is
+ compared to `<test>.ref` and the test passes if they are identical.
+
+2. Tests are formed from a single `<test>.status` file. This file is created by
+ the lua code in the test. It contains a single line per test case, this
+ single line should be `true` if the test case passed. The `<test>.status`
+ file is checked to ensure it contains only `true` lines and if so, the test
+ passes.
+
+The shell script `test.sh` looks for a file with extension `.in`, eg `test.in`,
+and opens it in vis. The corresponding lua file, `test.lua`, is executed and is
+expected to create either a `test.out` or `test.status` file.
+
+Type `make` to run all tests.