From 37f735ecdd426683a087c7e9fdb13779166b5c7a Mon Sep 17 00:00:00 2001 From: HO-COOH <42881734+HO-COOH@users.noreply.github.com> Date: Fri, 7 May 2021 00:15:36 +0800 Subject: Fix tags in generic order not expanded (#217) --- src/test/CppTests/Config.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/test') diff --git a/src/test/CppTests/Config.test.ts b/src/test/CppTests/Config.test.ts index ec52c61..59a92ef 100644 --- a/src/test/CppTests/Config.test.ts +++ b/src/test/CppTests/Config.test.ts @@ -235,6 +235,20 @@ suite("C++ - Configuration Tests", () => { assert.strictEqual("/**\n * @note\n */", result); }); + test("Custom tag expansion in function", () => { + testSetup.cfg = new Config(); + testSetup.cfg.Generic.order = ["custom"]; + testSetup.cfg.Generic.customTags = [ + "@author {author}", + "@date {date}", + "@note {email}", + ]; + testSetup.cfg.Generic.useGitUserName = true; + testSetup.cfg.Generic.useGitUserEmail = true; + const result = testSetup.SetLine("void foo();").GetResult(); + assert.notStrictEqual("/**\n * @author {author}\n * @date {date}\n * @note {email}\n */", result); + }); + test("Env variable", () => { testSetup.cfg = new Config(); testSetup.cfg.Generic.order = ["custom"]; -- cgit v1.2.3