From a513320a4741b2c4b140f9d983a7a43b5b8c714a Mon Sep 17 00:00:00 2001
From: ell <77150506+ellraiser@users.noreply.github.com>
Date: Fri, 6 Oct 2023 10:10:08 +0100
Subject: [PATCH] prevent empty tag
dorny/test-reporter@v1 will fail to parse tags that are empty as it's expected a message both in the attr and inside
---
.github/workflows/main.yml | 2 +-
testing/classes/TestMethod.lua | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 70d7a9489..4f7aa5628 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -206,7 +206,7 @@ jobs:
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg
path: pdb/Release/*.pdb
- name: Run All Tests
- run: build/love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}.exe testing --runAllTests
+ run: "build/love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}.exe" "testing" --console --runAllTests
- name: Test Report
uses: dorny/test-reporter@v1
with:
diff --git a/testing/classes/TestMethod.lua b/testing/classes/TestMethod.lua
index 7ef97ec81..7422fb935 100644
--- a/testing/classes/TestMethod.lua
+++ b/testing/classes/TestMethod.lua
@@ -303,13 +303,15 @@ TestMethod = {
-- get failure/skip message for output (if any)
local failure = ''
local output = ''
+ -- @NOTE if you don't put anything inside of the then
+ -- dorny/test-reporter@v1 will fail to parse it
if self.passed == false and self.skipped == false then
failure = '\t\t\t\n'
+ self.result.message .. '">' .. self.result.key .. ' ' .. self.result.message .. '\n'
output = self.result.key .. ' ' .. self.result.message
end
if output == '' and self.skipped == true then
- failure = '\t\t\t\n'
+ failure = '\t\t\t\n'
output = self.skipreason
end