Blame SOURCES/firewalld-0.7-0028-tests-functions-implement-a-better-m4_strip.patch

21c891
From 6bdf308d0bdf47055511a0e20630a8d2938768a5 Mon Sep 17 00:00:00 2001
21c891
From: Eric Garver <e@erig.me>
21c891
Date: Tue, 6 Nov 2018 15:45:51 -0500
21c891
Subject: [PATCH 28/34] tests/functions: implement a better m4_strip()
21c891
21c891
m4sugar's version is buggy and adds a space after newlines.
21c891
21c891
(cherry picked from commit f6a3116ee1df7990362bf08cc48bc05db75a4d18)
21c891
---
21c891
 src/tests/functions.at | 6 ++++++
21c891
 1 file changed, 6 insertions(+)
21c891
21c891
diff --git a/src/tests/functions.at b/src/tests/functions.at
21c891
index 9fd57e6a4b1a..7b5be8b6360c 100644
21c891
--- a/src/tests/functions.at
21c891
+++ b/src/tests/functions.at
21c891
@@ -217,6 +217,12 @@ m4_define([TRIMV], [[sed -e '/^[ \t]*$/d']])
21c891
 m4_define([TRIM_INTERNAL], [[sed -e 's/[ \t]\+/ /g']])
21c891
 m4_define([TRIM_WHITESPACE], [TRIM | TRIMV | TRIM_INTERNAL])
21c891
 
21c891
+dnl m4sugar's m4_strip has a bug that causes it to print a space after
21c891
+dnl newlines. So implement our own suck-less version.
21c891
+m4_define([m4_strip],
21c891
+[m4_bpatsubsts([$1], [[	 ]+], [ ],
21c891
+                     [^ ?\(.*\) ?$], [\1])])
21c891
+
21c891
 m4_define([NS_CMD], [dnl
21c891
     env DBUS_SYSTEM_BUS_ADDRESS="CURRENT_DBUS_ADDRESS" ip netns exec CURRENT_TEST_NS $1 dnl
21c891
 ])
21c891
-- 
21c891
2.18.0
21c891