>From 76539c469f153e2b3ebddbf76ad6b54b58205bb7 Mon Sep 17 00:00:00 2001
From: Jannick <thirdedition@gmx.net>
Date: Thu, 26 Dec 2019 02:53:01 +0100
Subject: [PATCH 1/2] m4sh/AS_IF: add test for AS_IF with blank false branch

which is supposed not to fail.

The test

make check TESTSUITEFLAGS='-e -k m4sh,m4_map_args_pair'

fails, since m4sh generates from

AS_IF([false], [echo OK], [[]])

the syntactically incorrect shell code

if false; then :
      echo OK
else

fi

* tests/m4sh.at: add test `AS_IF([false], [:], [[]])'
---
 tests/m4sh.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/m4sh.at b/tests/m4sh.at
index 9fd84558..da74fca7 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -1314,7 +1314,7 @@ AS_CASE([`touch file; false`]) && test -f file && echo fifteen
 dnl The next line is badly underquoted; don't intentionally copy this style.
 AS_CASE([foo], [foo], m4_do(AS_CASE([bar], [bar], [echo sixteen])))
 dnl Handle blank arguments.
-AS_IF([false], [:], [ ]) && AS_CASE([foo], [foo], []
+AS_IF([false], [:], [ ]) && AS_IF([false], [:], [[]]) && AS_CASE([foo], [foo], []
 ) && echo seventeen
 m4_define([empty])AS_IF([:], [empty]
 ) && AS_CASE([foo], [foo], [empty]) && echo eighteen
-- 
2.25.1.windows.1

