Skip to content

Commit 05cc3b8

Browse files
authored
Fix backslashes in escaping, typo (#803)
1 parent 22ac65d commit 05cc3b8

File tree

122 files changed

+281
-1903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+281
-1903
lines changed

internal/printer/utilities.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var escapedCharsMap = map[rune]string{
4444
'\b': `\b`,
4545
'\r': `\r`,
4646
'\n': `\n`,
47-
'\\': `\`,
47+
'\\': `\\`,
4848
'"': `\"`,
4949
'\'': `\'`,
5050
'`': "\\`",

testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.types

+34-34
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare var App: any;
1212

1313
var TestFileDir = ".\\TempTestFiles";
1414
>TestFileDir : string
15-
>".\\TempTestFiles" : ".\TempTestFiles"
15+
>".\\TempTestFiles" : ".\\TempTestFiles"
1616

1717
export class TestCase {
1818
>TestCase : TestCase
@@ -322,7 +322,7 @@ export var tests: TestRunner = (function () {
322322
>fileExists : any
323323
>TestFileDir + "\\Test.txt" : string
324324
>TestFileDir : string
325-
>"\\Test.txt" : "\Test.txt"
325+
>"\\Test.txt" : "\\Test.txt"
326326

327327
}));
328328
testRunner.addTest(new TestCase("Check file doesn't exist",
@@ -347,7 +347,7 @@ export var tests: TestRunner = (function () {
347347
>fileExists : any
348348
>TestFileDir + "\\Test2.txt" : string
349349
>TestFileDir : string
350-
>"\\Test2.txt" : "\Test2.txt"
350+
>"\\Test2.txt" : "\\Test2.txt"
351351

352352
}));
353353

@@ -374,7 +374,7 @@ export var tests: TestRunner = (function () {
374374
>FileManager : any
375375
>FileBuffer : any
376376
>isTextFile : any
377-
>"C:\\somedir\\readme.txt" : "C:\somedir\readme.txt"
377+
>"C:\\somedir\\readme.txt" : "C:\\somedir\\readme.txt"
378378

379379
FileManager.FileBuffer.isTextFile("C:\\spaces path\\myapp.str") &&
380380
>FileManager.FileBuffer.isTextFile("C:\\spaces path\\myapp.str") : any
@@ -383,7 +383,7 @@ export var tests: TestRunner = (function () {
383383
>FileManager : any
384384
>FileBuffer : any
385385
>isTextFile : any
386-
>"C:\\spaces path\\myapp.str" : "C:\spaces path\myapp.str"
386+
>"C:\\spaces path\\myapp.str" : "C:\\spaces path\\myapp.str"
387387

388388
FileManager.FileBuffer.isTextFile("C:\\somedir\\code.js"))
389389
>FileManager.FileBuffer.isTextFile("C:\\somedir\\code.js") : any
@@ -392,7 +392,7 @@ export var tests: TestRunner = (function () {
392392
>FileManager : any
393393
>FileBuffer : any
394394
>isTextFile : any
395-
>"C:\\somedir\\code.js" : "C:\somedir\code.js"
395+
>"C:\\somedir\\code.js" : "C:\\somedir\\code.js"
396396

397397
}));
398398
testRunner.addTest(new TestCase("Check makefile match",
@@ -414,7 +414,7 @@ export var tests: TestRunner = (function () {
414414
>FileManager : any
415415
>FileBuffer : any
416416
>isTextFile : any
417-
>"C:\\some dir\\makefile" : "C:\some dir\makefile"
417+
>"C:\\some dir\\makefile" : "C:\\some dir\\makefile"
418418

419419
}));
420420
testRunner.addTest(new TestCase("Check binary file doesn't match",
@@ -439,7 +439,7 @@ export var tests: TestRunner = (function () {
439439
>FileManager : any
440440
>FileBuffer : any
441441
>isTextFile : any
442-
>"C:\\somedir\\app.exe" : "C:\somedir\app.exe"
442+
>"C:\\somedir\\app.exe" : "C:\\somedir\\app.exe"
443443

444444
!FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll"));
445445
>!FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll") : boolean
@@ -449,7 +449,7 @@ export var tests: TestRunner = (function () {
449449
>FileManager : any
450450
>FileBuffer : any
451451
>isTextFile : any
452-
>"C:\\somedir\\my lib.dll" : "C:\somedir\my lib.dll"
452+
>"C:\\somedir\\my lib.dll" : "C:\\somedir\\my lib.dll"
453453

454454
}));
455455

@@ -514,7 +514,7 @@ export var tests: TestRunner = (function () {
514514
>app.rootDirectory : any
515515
>app : any
516516
>rootDirectory : any
517-
>".\\" : ".\"
517+
>".\\" : ".\\"
518518

519519
app.encodings[0] === "ascii" &&
520520
>app.encodings[0] === "ascii" : boolean
@@ -554,7 +554,7 @@ export var tests: TestRunner = (function () {
554554
>App : any
555555
>App : any
556556
>["-dir=C:\\test dir", "-lineEndings=LF", "-encodings=utf16be,ascii", "-recurse=false", "-fixlines"] : string[]
557-
>"-dir=C:\\test dir" : "-dir=C:\test dir"
557+
>"-dir=C:\\test dir" : "-dir=C:\\test dir"
558558
>"-lineEndings=LF" : "-lineEndings=LF"
559559
>"-encodings=utf16be,ascii" : "-encodings=utf16be,ascii"
560560
>"-recurse=false" : "-recurse=false"
@@ -601,7 +601,7 @@ export var tests: TestRunner = (function () {
601601
>app.rootDirectory : any
602602
>app : any
603603
>rootDirectory : any
604-
>"C:\\test dir" : "C:\test dir"
604+
>"C:\\test dir" : "C:\\test dir"
605605

606606
app.encodings[0] === "utf16be" &&
607607
>app.encodings[0] === "utf16be" : boolean
@@ -653,7 +653,7 @@ export var tests: TestRunner = (function () {
653653
>FileBuffer : any
654654
>TestFileDir + "\\noBOM.txt" : string
655655
>TestFileDir : string
656-
>"\\noBOM.txt" : "\noBOM.txt"
656+
>"\\noBOM.txt" : "\\noBOM.txt"
657657

658658
return fb.bom === 'none' && fb.encoding === 'utf8';
659659
>fb.bom === 'none' && fb.encoding === 'utf8' : boolean
@@ -689,7 +689,7 @@ export var tests: TestRunner = (function () {
689689
>FileBuffer : any
690690
>TestFileDir + "\\UTF8BOM.txt" : string
691691
>TestFileDir : string
692-
>"\\UTF8BOM.txt" : "\UTF8BOM.txt"
692+
>"\\UTF8BOM.txt" : "\\UTF8BOM.txt"
693693

694694
return fb.bom === 'utf8' && fb.encoding === 'utf8';
695695
>fb.bom === 'utf8' && fb.encoding === 'utf8' : boolean
@@ -725,7 +725,7 @@ export var tests: TestRunner = (function () {
725725
>FileBuffer : any
726726
>TestFileDir + "\\UTF16BE.txt" : string
727727
>TestFileDir : string
728-
>"\\UTF16BE.txt" : "\UTF16BE.txt"
728+
>"\\UTF16BE.txt" : "\\UTF16BE.txt"
729729

730730
return fb.bom === 'utf16be' && fb.encoding === 'utf16be';
731731
>fb.bom === 'utf16be' && fb.encoding === 'utf16be' : boolean
@@ -761,7 +761,7 @@ export var tests: TestRunner = (function () {
761761
>FileBuffer : any
762762
>TestFileDir + "\\UTF16LE.txt" : string
763763
>TestFileDir : string
764-
>"\\UTF16LE.txt" : "\UTF16LE.txt"
764+
>"\\UTF16LE.txt" : "\\UTF16LE.txt"
765765

766766
return fb.bom === 'utf16le' && fb.encoding === 'utf16le';
767767
>fb.bom === 'utf16le' && fb.encoding === 'utf16le' : boolean
@@ -797,7 +797,7 @@ export var tests: TestRunner = (function () {
797797
>FileBuffer : any
798798
>TestFileDir + "\\1bytefile.txt" : string
799799
>TestFileDir : string
800-
>"\\1bytefile.txt" : "\1bytefile.txt"
800+
>"\\1bytefile.txt" : "\\1bytefile.txt"
801801

802802
return fb.bom === 'none' && fb.encoding === 'utf8';
803803
>fb.bom === 'none' && fb.encoding === 'utf8' : boolean
@@ -833,7 +833,7 @@ export var tests: TestRunner = (function () {
833833
>FileBuffer : any
834834
>TestFileDir + "\\0bytefile.txt" : string
835835
>TestFileDir : string
836-
>"\\0bytefile.txt" : "\0bytefile.txt"
836+
>"\\0bytefile.txt" : "\\0bytefile.txt"
837837

838838
return fb.bom === 'none' && fb.encoding === 'utf8';
839839
>fb.bom === 'none' && fb.encoding === 'utf8' : boolean
@@ -871,7 +871,7 @@ export var tests: TestRunner = (function () {
871871
>FileBuffer : any
872872
>TestFileDir + "\\UTF8BOM.txt" : string
873873
>TestFileDir : string
874-
>"\\UTF8BOM.txt" : "\UTF8BOM.txt"
874+
>"\\UTF8BOM.txt" : "\\UTF8BOM.txt"
875875

876876
var chars = [];
877877
>chars : any[]
@@ -938,7 +938,7 @@ export var tests: TestRunner = (function () {
938938
>FileBuffer : any
939939
>TestFileDir + "\\UTF8BOM.txt" : string
940940
>TestFileDir : string
941-
>"\\UTF8BOM.txt" : "\UTF8BOM.txt"
941+
>"\\UTF8BOM.txt" : "\\UTF8BOM.txt"
942942

943943
var chars = [];
944944
>chars : any[]
@@ -1103,7 +1103,7 @@ export var tests: TestRunner = (function () {
11031103
>filename : string
11041104
>TestFileDir + "\\tmpUTF16LE.txt" : string
11051105
>TestFileDir : string
1106-
>"\\tmpUTF16LE.txt" : "\tmpUTF16LE.txt"
1106+
>"\\tmpUTF16LE.txt" : "\\tmpUTF16LE.txt"
11071107

11081108
var fb = new FileManager.FileBuffer(14);
11091109
>fb : any
@@ -1246,7 +1246,7 @@ export var tests: TestRunner = (function () {
12461246
>FileBuffer : any
12471247
>TestFileDir + "\\UTF8BOM.txt" : string
12481248
>TestFileDir : string
1249-
>"\\UTF8BOM.txt" : "\UTF8BOM.txt"
1249+
>"\\UTF8BOM.txt" : "\\UTF8BOM.txt"
12501250

12511251
var result = fb.readByte(200);
12521252
>result : any
@@ -1282,7 +1282,7 @@ export var tests: TestRunner = (function () {
12821282
>FileBuffer : any
12831283
>TestFileDir + "\\UTF8BOM.txt" : string
12841284
>TestFileDir : string
1285-
>"\\UTF8BOM.txt" : "\UTF8BOM.txt"
1285+
>"\\UTF8BOM.txt" : "\\UTF8BOM.txt"
12861286

12871287
fb.writeByte(5, 200);
12881288
>fb.writeByte(5, 200) : any
@@ -1319,7 +1319,7 @@ export var tests: TestRunner = (function () {
13191319
>FileBuffer : any
13201320
>TestFileDir + "\\utf16leNonBmp.txt" : string
13211321
>TestFileDir : string
1322-
>"\\utf16leNonBmp.txt" : "\utf16leNonBmp.txt"
1322+
>"\\utf16leNonBmp.txt" : "\\utf16leNonBmp.txt"
13231323

13241324
if (savedFile.encoding !== 'utf16le') {
13251325
>savedFile.encoding !== 'utf16le' : boolean
@@ -1398,7 +1398,7 @@ export var tests: TestRunner = (function () {
13981398
>FileBuffer : any
13991399
>TestFileDir + "\\utf8NonBmp.txt" : string
14001400
>TestFileDir : string
1401-
>"\\utf8NonBmp.txt" : "\utf8NonBmp.txt"
1401+
>"\\utf8NonBmp.txt" : "\\utf8NonBmp.txt"
14021402

14031403
if (savedFile.encoding !== 'utf8') {
14041404
>savedFile.encoding !== 'utf8' : boolean
@@ -1472,7 +1472,7 @@ export var tests: TestRunner = (function () {
14721472
>filename : string
14731473
>TestFileDir + "\\tmpUTF8nonBmp.txt" : string
14741474
>TestFileDir : string
1475-
>"\\tmpUTF8nonBmp.txt" : "\tmpUTF8nonBmp.txt"
1475+
>"\\tmpUTF8nonBmp.txt" : "\\tmpUTF8nonBmp.txt"
14761476

14771477
var fb = new FileManager.FileBuffer(15);
14781478
>fb : any
@@ -1598,7 +1598,7 @@ export var tests: TestRunner = (function () {
15981598
>filename : string
15991599
>TestFileDir + "\\utf8BadLeadByte.txt" : string
16001600
>TestFileDir : string
1601-
>"\\utf8BadLeadByte.txt" : "\utf8BadLeadByte.txt"
1601+
>"\\utf8BadLeadByte.txt" : "\\utf8BadLeadByte.txt"
16021602

16031603
var fb = new FileManager.FileBuffer(filename);
16041604
>fb : any
@@ -1630,7 +1630,7 @@ export var tests: TestRunner = (function () {
16301630
>filename : string
16311631
>TestFileDir + "\\utf8InvalidTail.txt" : string
16321632
>TestFileDir : string
1633-
>"\\utf8InvalidTail.txt" : "\utf8InvalidTail.txt"
1633+
>"\\utf8InvalidTail.txt" : "\\utf8InvalidTail.txt"
16341634

16351635
var fb = new FileManager.FileBuffer(filename);
16361636
>fb : any
@@ -1662,7 +1662,7 @@ export var tests: TestRunner = (function () {
16621662
>filename : string
16631663
>TestFileDir + "\\ansi.txt" : string
16641664
>TestFileDir : string
1665-
>"\\ansi.txt" : "\ansi.txt"
1665+
>"\\ansi.txt" : "\\ansi.txt"
16661666

16671667
var fb = new FileManager.FileBuffer(filename);
16681668
>fb : any
@@ -1694,7 +1694,7 @@ export var tests: TestRunner = (function () {
16941694
>filename : string
16951695
>TestFileDir + "\\utf16leInvalidSurrogate.txt" : string
16961696
>TestFileDir : string
1697-
>"\\utf16leInvalidSurrogate.txt" : "\utf16leInvalidSurrogate.txt"
1697+
>"\\utf16leInvalidSurrogate.txt" : "\\utf16leInvalidSurrogate.txt"
16981698

16991699
var fb = new FileManager.FileBuffer(filename);
17001700
>fb : any
@@ -1726,7 +1726,7 @@ export var tests: TestRunner = (function () {
17261726
>filename : string
17271727
>TestFileDir + "\\UTF16BEInvalidSurrogate.txt" : string
17281728
>TestFileDir : string
1729-
>"\\UTF16BEInvalidSurrogate.txt" : "\UTF16BEInvalidSurrogate.txt"
1729+
>"\\UTF16BEInvalidSurrogate.txt" : "\\UTF16BEInvalidSurrogate.txt"
17301730

17311731
var fb = new FileManager.FileBuffer(filename);
17321732
>fb : any
@@ -1758,7 +1758,7 @@ export var tests: TestRunner = (function () {
17581758
>filename : string
17591759
>TestFileDir + "\\utf16leMissingTrailSurrogate.txt" : string
17601760
>TestFileDir : string
1761-
>"\\utf16leMissingTrailSurrogate.txt" : "\utf16leMissingTrailSurrogate.txt"
1761+
>"\\utf16leMissingTrailSurrogate.txt" : "\\utf16leMissingTrailSurrogate.txt"
17621762

17631763
var fb = new FileManager.FileBuffer(filename);
17641764
>fb : any
@@ -1791,7 +1791,7 @@ export var tests: TestRunner = (function () {
17911791
>filename : string
17921792
>TestFileDir + "\\charCountASCII.txt" : string
17931793
>TestFileDir : string
1794-
>"\\charCountASCII.txt" : "\charCountASCII.txt"
1794+
>"\\charCountASCII.txt" : "\\charCountASCII.txt"
17951795

17961796
var fb = new FileManager.FileBuffer(filename);
17971797
>fb : any
@@ -1850,7 +1850,7 @@ export var tests: TestRunner = (function () {
18501850
>filename : string
18511851
>TestFileDir + "\\controlChar.txt" : string
18521852
>TestFileDir : string
1853-
>"\\controlChar.txt" : "\controlChar.txt"
1853+
>"\\controlChar.txt" : "\\controlChar.txt"
18541854

18551855
var fb = new FileManager.FileBuffer(filename);
18561856
>fb : any

0 commit comments

Comments
 (0)