From d8fd89e5a42d71476f0e9a6a5c57905dd8754e52 Mon Sep 17 00:00:00 2001
From: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Thu, 21 Jun 2018 12:22:57 +0200
Subject: [PATCH] test: fix check output depending on environment

fixes #114
---
 test/test_luaunit.lua | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/test/test_luaunit.lua b/test/test_luaunit.lua
index 54f8d94..7271ec8 100644
--- a/test/test_luaunit.lua
+++ b/test/test_luaunit.lua
@@ -493,19 +493,7 @@ bar"=1}]] )
         local t9 = {"t9", {}}
         t9[{t9}] = 1
 
-        if os.getenv('TRAVIS_OS_NAME') == 'osx' then
-            -- on os X, because table references are longer, the table is expanded on multiple lines.
-            --[[ Output example:
-            '<table: 0x7f984a50d200> {
-                "t9",
-                <table: 0x7f984a50d390> {},
-                <table: 0x7f984a50d410> {<table: 0x7f984a50d200>}=1
-            }'
-            ]]
-            lu.assertStrMatches(lu.prettystr(t9, true), '(<table: 0?x?[%x]+>) {\n%s+"t9",\n%s+(<table: 0?x?[%x]+>) {},\n%s+(<table: 0?x?[%x]+>) {%1}=1\n}')
-        else
-            lu.assertStrMatches(lu.prettystr(t9, true), '(<table: 0?x?[%x]+>) {"t9", (<table: 0?x?[%x]+>) {}, (<table: 0?x?[%x]+>) {%1}=1}')
-        end
+        lu.assertStrMatches(lu.prettystr(t9, true), '(<table: 0?x?[%x]+>) {\n?%s*"t9",\n?%s*(<table: 0?x?[%x]+>) {},\n?%s*(<table: 0?x?[%x]+>) {%1}=1\n?}')
     end
 
     function TestLuaUnitUtilities:test_prettystrPairs()
-- 
2.17.1

