A new user interface for you! Read more...

File 0001-test-Erlang-OTP-21-stacktrace-syntax-support.patch of Package erlando

From fef42aad35542551eab9620f740950c3695c7133 Mon Sep 17 00:00:00 2001
From: Led <ledest@gmail.com>
Date: Mon, 25 Feb 2019 01:13:59 +0200
Subject: [PATCH] test: Erlang/OTP >= 21 stacktrace syntax support

---
 src/test.erl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/test.erl b/src/test.erl
index 035159e..4ccd881 100644
--- a/src/test.erl
+++ b/src/test.erl
@@ -69,6 +69,14 @@ test_funs(ErrorT, [Fun|Funs]) when is_function(Fun, 0) ->
     do([ErrorT || hoist(ErrorT, anonymous_function, Fun),
                   test_funs(ErrorT, Funs)]).
 
+-ifdef('OTP_RELEASE').
+-if (?OTP_RELEASE >= 21).
+-define(FAIL(), Class:Reason:Stacktrace -> fail({Label, Class, Reason, Stacktrace})).
+-endif.
+-endif.
+-ifndef(FAIL).
+-define(FAIL(), Class:Reason -> fail({Label, Class, Reason, erlang:get_stacktrace()})).
+-endif.
 
 hoist(ErrorT, Label, PlainFun) ->
     do([ErrorT ||
@@ -76,6 +84,5 @@ hoist(ErrorT, Label, PlainFun) ->
                PlainFun(),
                return(passed)
            catch
-               Class:Reason ->
-                   fail({Label, Class, Reason, erlang:get_stacktrace()})
+               ?FAIL()
            end]).
-- 
2.16.4