Skip to content

Commit

Permalink
Chore: Test multline autofix with CRLF
Browse files Browse the repository at this point in the history
Originally discovered in #120 and cherry-picked from #125.
  • Loading branch information
btmills committed May 20, 2021
1 parent ae4cf4e commit 66d29e2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,33 @@ describe("plugin", () => {
assert.strictEqual(actual, expected);
});

it("with multiline autofix and CRLF", () => {
const input = [
"This is Markdown.",
"",
"```js",
"console.log('Hello, \\",
"world!')",
"console.log('Hello, \\",
"world!')",
"```"
].join("\r\n");
const expected = [
"This is Markdown.",
"",
"```js",
"console.log(\"Hello, \\",
"world!\")",
"console.log(\"Hello, \\",
"world!\")",
"```"
].join("\r\n");
const report = cli.executeOnText(input, "test.md");
const actual = report.results[0].output;

assert.strictEqual(actual, expected);
});

// https://spec.commonmark.org/0.28/#fenced-code-blocks
describe("when indented", () => {
it("by one space", () => {
Expand Down

0 comments on commit 66d29e2

Please sign in to comment.