Changes
diff --git a/tests/test_macrodown.cpp b/tests/test_macrodown.cpp
index c080cae..2c58235 100644
--- a/tests/test_macrodown.cpp
+++ b/tests/test_macrodown.cpp
@@ -59,4 +59,14 @@ TEST(MacroDownTest, MixedContent)
std::string input = "# Header\n\nParagraph with *em* and %code{macros}.";
std::string expected = "<h1>Header</h1>\n<p>Paragraph with <em>em</em> and <code>macros</code>.</p>\n";
EXPECT_EQ(md.render(*md.parse(input)), expected);
+}
+
+TEST(MacroDownTest, InlineDefinition)
+{
+ MacroDown md;
+ std::string input = "%def[bold]{t}{<b>%t</b>}\n\nThis is %bold{important}.";
+ // The first paragraph only contains the definition, which evaluates to empty string.
+ // The second paragraph uses the newly defined macro.
+ std::string expected = "<p>This is <b>important</b>.</p>\n";
+ EXPECT_EQ(md.render(*md.parse(input)), expected);
}
\ No newline at end of file