fix: restore project placeholders regardless of case
This commit is contained in:
@@ -132,6 +132,12 @@ describe("Velum-Projektstände", () => {
|
||||
expect(project.restorePath("Archiv/BerichtPERSON_01.docx", {
|
||||
PERSON_01: { original: "Max Mustermann", type: "PERSON" },
|
||||
})).toBe("Archiv/BerichtMax Mustermann.docx");
|
||||
expect(project.restorePath("archiv/bericht_person_01.docx", {
|
||||
PERSON_01: { original: "Max Mustermann", type: "PERSON" },
|
||||
})).toBe("archiv/bericht_Max Mustermann.docx");
|
||||
expect(project.restoreTextWithCount("person_01 und Person_01", {
|
||||
PERSON_01: { original: "Max Mustermann", type: "PERSON" },
|
||||
})).toEqual({ text: "Max Mustermann und Max Mustermann", replacements: 2 });
|
||||
expect(project.restoreText("BerichtPERSON_01", {
|
||||
PERSON_01: { original: "Max Mustermann", type: "PERSON" },
|
||||
})).toBe("BerichtPERSON_01");
|
||||
@@ -139,6 +145,10 @@ describe("Velum-Projektstände", () => {
|
||||
PERSON_01: { original: "Falsch", type: "PERSON" },
|
||||
PERSON_0101: { original: "Richtig", type: "PERSON" },
|
||||
})).toBe("Richtig.txt");
|
||||
expect(project.restoreText("Person_01 / PERSON_01", {
|
||||
PERSON_01: { original: "Eins", type: "PERSON" },
|
||||
person_01: { original: "Zwei", type: "PERSON" },
|
||||
})).toBe("Person_01 / Eins");
|
||||
expect(() => project.safeRelativePath("../geheim.txt")).toThrow();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user