aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-07-06 22:59:24 -0400
committerGitHub <noreply@github.com>2021-07-06 22:59:24 -0400
commit9935e154f1d2d9881c636b9a93f9d31b04621287 (patch)
treec98fb456cb118ec0a9eb0812a081b9e07e0ab53e /test
parent1088c17503cd6f52019a094ac19f68b0e12ba007 (diff)
Update options-util tests and comment (#1806)
Diffstat (limited to 'test')
-rw-r--r--test/test-options-util.js22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/test-options-util.js b/test/test-options-util.js
index b942c66f..15a11265 100644
--- a/test/test-options-util.js
+++ b/test/test-options-util.js
@@ -661,7 +661,7 @@ async function testFieldTemplatesUpdate(extDir) {
const getUpdateAdditions = (startVersion, targetVersion) => {
let value = '';
for (const {version, changes} of updates) {
- if (version < startVersion || version > targetVersion || changes.length === 0) { continue; }
+ if (version <= startVersion || version > targetVersion || changes.length === 0) { continue; }
if (value.length > 0) { value += '\n'; }
value += changes;
}
@@ -936,22 +936,30 @@ async function testFieldTemplatesUpdate(extDir) {
oldVersion: 12,
newVersion: 13,
old: `
+{{#*inline "example"}}
{{~#if (op "<=" glossary.length 1)~}}
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{/each}}
{{~else if @root.compactGlossaries~}}
{{#each glossary}}{{#multiLine}}{{.}}{{/multiLine}}{{#unless @last}} | {{/unless}}{{/each}}
{{~else~}}
<ul>{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}</ul>
- {{~/if~}}`.trimStart(),
+ {{~/if~}}
+{{/inline}}
+
+{{~> (lookup . "marker") ~}}`.trimStart(),
expected: `
+{{#*inline "example"}}
{{~#if (op "<=" glossary.length 1)~}}
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{/each}}
{{~else if @root.compactGlossaries~}}
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{#unless @last}} | {{/unless}}{{/each}}
{{~else~}}
<ul>{{#each glossary}}<li>{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}</li>{{/each}}</ul>
- {{~/if~}}`.trimStart()
+ {{~/if~}}
+{{/inline}}
+
+{{~> (lookup . "marker") ~}}`.trimStart()
},
// hasMedia/getMedia update
{
@@ -976,7 +984,9 @@ async function testFieldTemplatesUpdate(extDir) {
{{#*inline "clipboard-text"}}
{{~#if definition.clipboardText~}}{{definition.clipboardText}}{{~/if~}}
-{{/inline}}`.trimStart(),
+{{/inline}}
+
+{{~> (lookup . "marker") ~}}`.trimStart(),
expected: `
{{#*inline "audio"}}
@@ -999,7 +1009,9 @@ async function testFieldTemplatesUpdate(extDir) {
{{#*inline "clipboard-text"}}
{{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText" format="text"}}{{/getMedia}}{{/if~}}
-{{/inline}}`.trimStart()
+{{/inline}}
+
+{{~> (lookup . "marker") ~}}`.trimStart()
}
];