Skip to content

Commit 77f4b45

Browse files
Revert "Remove new lines to validate tests across platforms better (windows specifically)"
This reverts commit f229753.
1 parent 0c70525 commit 77f4b45

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

src/test/extension.test.ts

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ type StringTransformationTest = [
1919
let editor: vscode.TextEditor;
2020
let document: vscode.TextDocument;
2121
const originalShowInputBox = vscode.window.showInputBox;
22-
const removeNewLines = (str: string) => str.replace(/[\n\r]/g, "");
2322

2423
suite("Extension Test Suite", () => {
2524
beforeEach(async () => {
@@ -376,8 +375,8 @@ suite("Extension Test Suite", () => {
376375
);
377376

378377
assert.strictEqual(output1, "a2 b3 c4 5d 6e 7f 13x y24 35z46");
379-
assert.strictEqual(output2, "a2 b3 c4 5d 6e7f 13x y24 35z46");
380-
assert.strictEqual(output3, "a-3 b-2 c-1 0d 1e7f 13x y24 35z46");
378+
assert.strictEqual(output2, "a2 b3 c4 5d 6e\n7f 13x y24 35z46");
379+
assert.strictEqual(output3, "a-3 b-2 c-1 0d 1e\n7f 13x y24 35z46");
381380
});
382381

383382
test("decrement", async () => {
@@ -400,14 +399,8 @@ suite("Extension Test Suite", () => {
400399
);
401400

402401
assert.strictEqual(output1, "a0 b1 c2 3d 4e 5f 11x y22 33z44");
403-
assert.strictEqual(
404-
removeNewLines(output2),
405-
"a0 b1 c2 3d4e 5f 11x y22 33z44"
406-
);
407-
assert.strictEqual(
408-
removeNewLines(output3),
409-
"a-4 b-3 c-2 -1d0e 5f 11x y22 33z44"
410-
);
402+
assert.strictEqual(output2, "a0 b1 c2 3d\n4e 5f 11x y22 33z44");
403+
assert.strictEqual(output3, "a-4 b-3 c-2 -1d\n0e 5f 11x y22 33z44");
411404
});
412405

413406
test("duplicateAndIncrement", async () => {
@@ -422,8 +415,8 @@ suite("Extension Test Suite", () => {
422415
);
423416

424417
assert.strictEqual(
425-
removeNewLines(output),
426-
"a1 b2 c3 4d 5e 6f 12x y23 34z45a2 b3 c4 5d 6e 7f 13x y24 35z46"
418+
output,
419+
"a1 b2 c3 4d 5e 6f 12x y23 34z45a2 b3 c4 5d 6e 7f 13x y24 35z46\n"
427420
);
428421
});
429422

@@ -439,8 +432,8 @@ suite("Extension Test Suite", () => {
439432
);
440433

441434
assert.strictEqual(
442-
removeNewLines(output),
443-
"a1 b2 c3 4d 5e 6f 12x y23 34z45a0 b1 c2 3d 4e 5f 11x y22 33z44"
435+
output,
436+
"a1 b2 c3 4d 5e 6f 12x y23 34z45a0 b1 c2 3d 4e 5f 11x y22 33z44\n"
444437
);
445438
});
446439

@@ -460,10 +453,7 @@ suite("Extension Test Suite", () => {
460453
);
461454

462455
assert.strictEqual(output1, "a1 b2 c3 4d 5e 6f 7x y8 9z10");
463-
assert.strictEqual(
464-
removeNewLines(output2),
465-
"a11 b12 c1314d 15e 16f 17x y18 19z20"
466-
);
456+
assert.strictEqual(output2, "a11 b12 c13\n14d 15e 16f 17x y18 19z20");
467457
});
468458

469459
test("utf8ToChar", async () => {

0 commit comments

Comments
 (0)