Blame SOURCES/0010-tests-functions-implement-a-better-m4_strip.patch

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