diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2016-06-26 17:23:06 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-06-26 17:23:06 +0300 |
commit | f81bcd7b18b12c7c2a02efa19a7572a72c2bda09 (patch) | |
tree | 0fef9eaf44cc77c2cdf926de6fa7d85d7e827b7e | |
parent | 7d2fc0b3adca1b2472470bdfd047f761a22f81d8 (diff) | |
download | luacov-f81bcd7b18b12c7c2a02efa19a7572a72c2bda09.tar.gz |
Add a test for cluacov
-rw-r--r-- | tests/cli.lua | 4 | ||||
-rw-r--r-- | tests/cluacov/expected.out | 16 | ||||
-rw-r--r-- | tests/cluacov/test.lua | 3 |
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/cli.lua b/tests/cli.lua index 4e31fb1..4360f8e 100644 --- a/tests/cli.lua +++ b/tests/cli.lua @@ -71,4 +71,8 @@ test("hook") test("nested") +if pcall(require, "cluacov.version") then + test("cluacov") +end + print(("%d CLI tests passed."):format(ntests)) diff --git a/tests/cluacov/expected.out b/tests/cluacov/expected.out new file mode 100644 index 0000000..e69870f --- /dev/null +++ b/tests/cluacov/expected.out @@ -0,0 +1,16 @@ +============================================================================== +test.lua +============================================================================== + local s = "some text" + 1 .. "some other" + 1 return s + +============================================================================== +Summary +============================================================================== + +File Hits Missed Coverage +----------------------------- +test.lua 2 0 100.00% +----------------------------- +Total 2 0 100.00% diff --git a/tests/cluacov/test.lua b/tests/cluacov/test.lua new file mode 100644 index 0000000..bd21241 --- /dev/null +++ b/tests/cluacov/test.lua @@ -0,0 +1,3 @@ +local s = "some text" + .. "some other" +return s |