From c915e830b34ce1355df28086245cc2668fca09ae Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Tue, 4 Oct 2022 17:02:03 +0200
Subject: [PATCH] TST: Add test for recursion of macros

---
 unittests/test_macros.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/unittests/test_macros.py b/unittests/test_macros.py
index a6c81e04..98fdf642 100644
--- a/unittests/test_macros.py
+++ b/unittests/test_macros.py
@@ -272,11 +272,18 @@ metadata:
       params: {}
       definition: !macro
         test_two:
+    - !defmacro
+      name: test_four
+      params: {}
+      definition: !macro
+        test_four:
 ---
 extroot: !macro
   test_one:
 extroot2: !macro
   test_three:
+extroot3: !macro
+  test_four:
     """)
     # macros in macros can be used, but there are no circles; they stop at the first one.
     assert "test_one" not in cfood["extroot"]
@@ -284,3 +291,5 @@ extroot2: !macro
     assert "test_three" not in cfood["extroot2"]
     assert "test_one" not in cfood["extroot2"]
     assert cfood["extroot2"]["test_two"] is None
+    # No recursion
+    assert cfood["extroot3"]["test_four"] is None
-- 
GitLab