From 9422f1ccb7c325809d8b4bcc8f7f1d05f74bcc93 Mon Sep 17 00:00:00 2001
From: bigbes <bigbes@gmail.com>
Date: Thu, 10 Mar 2016 19:13:26 +0300
Subject: [PATCH] tap:check returns boolean, depends on fail/success

---
 src/lua/tap.lua | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/lua/tap.lua b/src/lua/tap.lua
index 67cb4026cf..fab588561f 100644
--- a/src/lua/tap.lua
+++ b/src/lua/tap.lua
@@ -27,7 +27,7 @@ local function traceback(level)
             what = info.what;
             name = info.name;
             namewhat = info.namewhat;
-            filename = info.source:sub(1, 1) == "@" and info.source:sub(2) or 
+            filename = info.source:sub(1, 1) == "@" and info.source:sub(2) or
                 'eval'
         }
         table.insert(trace, frame)
@@ -252,7 +252,6 @@ local function check(test)
                 failed = test.failed;
                 planned = test.planned;
             })
-            return false
         else
             diag(test, "failed subtest: %d", test.failed)
         end
@@ -261,7 +260,7 @@ local function check(test)
             ok(test.parent, true, test.name)
         end
     end
-    return true
+    return test.planned == test.total and test.failed == 0
 end
 
 test_mt = {
-- 
GitLab