summaryrefslogtreecommitdiffstats
path: root/src/test/CppTests/Config.test.ts
diff options
context:
space:
mode:
authorHO-COOH <42881734+HO-COOH@users.noreply.github.com>2021-05-15 00:14:36 +0800
committerGitHub <noreply@github.com>2021-05-14 18:14:36 +0200
commitaf70cf95d9d010f27da1c1c8987c807ee3255a10 (patch)
tree9d6de559ea072c684f690d32816f7fe3ae1a88d3 /src/test/CppTests/Config.test.ts
parentbe07386c572fe8258a3b4c101b85dd900867bb13 (diff)
downloaddoxdocgen-af70cf95d9d010f27da1c1c8987c807ee3255a10.tar.gz
Refactor, add {file} template (#221)
* Refactor, add {file} template * Add test for {file} expansion
Diffstat (limited to 'src/test/CppTests/Config.test.ts')
-rw-r--r--src/test/CppTests/Config.test.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/CppTests/Config.test.ts b/src/test/CppTests/Config.test.ts
index 1afbef3..f6ec573 100644
--- a/src/test/CppTests/Config.test.ts
+++ b/src/test/CppTests/Config.test.ts
@@ -11,6 +11,7 @@ import * as assert from "assert";
import * as moment from "moment";
import * as vscode from "vscode";
import { Config } from "../../Config";
+import GitConfig from "../../GitConfig";
import TestSetup from "./TestSetup";
// Defines a Mocha test suite to group tests of similar kind together
@@ -242,11 +243,12 @@ suite("C++ - Configuration Tests", () => {
"@author {author}",
"@date {date}",
"@note {email}",
+ "@file {file}",
];
- testSetup.cfg.Generic.useGitUserName = true;
- testSetup.cfg.Generic.useGitUserEmail = true;
const result = testSetup.SetLine("void foo();").GetResult();
- assert.notStrictEqual(result, "/**\n * @author {author}\n * @date {date}\n * @note {email}\n */");
+ const date = moment().format("YYYY-MM-DD");
+ assert.strictEqual(result, `/**\n * @author your name\n * @date ${date}\n * @note you@domain.com\n` +
+ ` * @file MockDocument.h\n */`);
});
test("Env variable", () => {