mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
24 lines
796 B
JavaScript
24 lines
796 B
JavaScript
import TestRegister from "../../lib/TestRegister.mjs";
|
|
import Utils from "../../../src/core/Utils.mjs";
|
|
import it from "../assertionHandler.mjs";
|
|
import assert from "assert";
|
|
|
|
TestRegister.addApiTests([
|
|
it("Utils: should parse six backslashes correctly", () => {
|
|
assert.equal(Utils.parseEscapedChars("\\\\\\\\\\\\"), "\\\\\\");
|
|
}),
|
|
|
|
it("Utils: should parse escaped quotes correctly", () => {
|
|
assert.equal(Utils.parseEscapedChars("\\'"), "'");
|
|
}),
|
|
|
|
it("Utils: should parse escaped quotes and backslashes correctly", () => {
|
|
assert.equal(Utils.parseEscapedChars("\\\\'"), "\\'");
|
|
}),
|
|
|
|
it("Utils: should parse escaped quotes and escaped backslashes correctly", () => {
|
|
assert.equal(Utils.parseEscapedChars("\\\\\\'"), "\\'");
|
|
}),
|
|
|
|
]);
|