@@ -767,9 +767,9 @@ namespace Harness {
767767}
768768
769769namespace Harness {
770- const tcServicesFileName = "built/local/typescriptServices.js" ;
771770 export const libFolder = "built/local/" ;
772- export let tcServicesFile = IO . readFile ( tcServicesFileName ) ;
771+ const tcServicesFileName = ts . combinePaths ( libFolder , "typescriptServices.js" ) ;
772+ export const tcServicesFile = IO . readFile ( tcServicesFileName ) ;
773773
774774 export interface SourceMapEmitterCallback {
775775 ( emittedFile : string , emittedLine : number , emittedColumn : number , sourceFile : string , sourceLine : number , sourceColumn : number , sourceName : string ) : void ;
@@ -990,7 +990,6 @@ namespace Harness {
990990 options . noErrorTruncation = true ;
991991 options . skipDefaultLibCheck = true ;
992992
993- const newLine = "\r\n" ;
994993 currentDirectory = currentDirectory || Harness . IO . getCurrentDirectory ( ) ;
995994
996995 // Parse settings
@@ -1002,27 +1001,30 @@ namespace Harness {
10021001 useCaseSensitiveFileNames = options . useCaseSensitiveFileNames ;
10031002 }
10041003
1004+ const programFiles : TestFile [ ] = inputFiles . slice ( ) ;
10051005 // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context.
10061006 // Treat them as library files, so include them in build, but not in baselines.
1007- const includeBuiltFiles : TestFile [ ] = [ ] ;
10081007 if ( options . includeBuiltFile ) {
1009- const builtFileName = libFolder + options . includeBuiltFile ;
1008+ const builtFileName = ts . combinePaths ( libFolder , options . includeBuiltFile ) ;
10101009 const builtFile : TestFile = {
10111010 unitName : builtFileName ,
1012- content : normalizeLineEndings ( IO . readFile ( builtFileName ) , newLine ) ,
1011+ content : normalizeLineEndings ( IO . readFile ( builtFileName ) , Harness . IO . newLine ( ) ) ,
10131012 } ;
1014- includeBuiltFiles . push ( builtFile ) ;
1013+ programFiles . push ( builtFile ) ;
10151014 }
10161015
10171016 const fileOutputs : GeneratedFile [ ] = [ ] ;
10181017
1019- const programFiles = inputFiles . concat ( includeBuiltFiles ) . map ( file => file . unitName ) ;
1018+ const programFileNames = programFiles . map ( file => file . unitName ) ;
10201019
10211020 const compilerHost = createCompilerHost (
1022- inputFiles . concat ( includeBuiltFiles ) . concat ( otherFiles ) ,
1021+ programFiles . concat ( otherFiles ) ,
10231022 ( fileName , code , writeByteOrderMark ) => fileOutputs . push ( { fileName, code, writeByteOrderMark } ) ,
1024- options . target , useCaseSensitiveFileNames , currentDirectory , options . newLine ) ;
1025- const program = ts . createProgram ( programFiles , options , compilerHost ) ;
1023+ options . target ,
1024+ useCaseSensitiveFileNames ,
1025+ currentDirectory ,
1026+ options . newLine ) ;
1027+ const program = ts . createProgram ( programFileNames , options , compilerHost ) ;
10261028
10271029 const emitResult = program . emit ( ) ;
10281030
0 commit comments