summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormpeterv <mpeterval@gmail.com>2016-04-18 11:45:33 +0300
committermpeterv <mpeterval@gmail.com>2016-04-18 15:07:21 +0300
commit8fa9c4e050906fde4587a0fe0d8b25b8fe5c9e11 (patch)
treec59f886ced9bc6d385615b4ff30ae2c4ed72c2b8
parent368f528b63cb8593d04b20076d8812b5f35837e5 (diff)
downloadluacov-8fa9c4e050906fde4587a0fe0d8b25b8fe5c9e11.tar.gz
Tweak a CLI test to test how missed lines are reported
-rw-r--r--tests/simple/expected.out13
-rw-r--r--tests/simple/test.lua9
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/simple/expected.out b/tests/simple/expected.out
index a1c1d6b..c2d02ae 100644
--- a/tests/simple/expected.out
+++ b/tests/simple/expected.out
@@ -1,10 +1,11 @@
==============================================================================
test.lua
==============================================================================
- 1 local a = 1
- 1 local b = 2
-
- 1 local c = 3
+ 1 if 10 > 100 then
+*0 local msg = "I don't think this line will execute."
+ else
+ 1 local msg = "Hello, LuaCov!"
+ end
==============================================================================
Summary
@@ -12,6 +13,6 @@ Summary
File Hits Missed Coverage
-----------------------------
-test.lua 3 0 100.00%
+test.lua 2 1 66.67%
-----------------------------
-Total 3 0 100.00%
+Total 2 1 66.67%
diff --git a/tests/simple/test.lua b/tests/simple/test.lua
index b06a5f8..1f5fcf4 100644
--- a/tests/simple/test.lua
+++ b/tests/simple/test.lua
@@ -1,4 +1,5 @@
-local a = 1
-local b = 2
-
-local c = 3
+if 10 > 100 then
+ local msg = "I don't think this line will execute."
+else
+ local msg = "Hello, LuaCov!"
+end