File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
test/dotnet.Tests/CommandTests/Run Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1632,23 +1632,23 @@ Hello from {programName}
16321632 throw new InvalidOperationException ( $ "File exists in CSC-only run but not in MSBuild run: { cscOnlyFile } ") ;
16331633 }
16341634
1635- var cscOnlyFileBytes = File . ReadAllBytes ( cscOnlyFile ) ;
1636- var msbuildFileBytes = File . ReadAllBytes ( msbuildFile ) ;
1637- if ( ! cscOnlyFileBytes . SequenceEqual ( msbuildFileBytes ) )
1635+ var cscOnlyFileText = File . ReadAllText ( cscOnlyFile ) ;
1636+ var msbuildFileText = File . ReadAllText ( msbuildFile ) ;
1637+ if ( cscOnlyFileText . ReplaceLineEndings ( ) != msbuildFileText . ReplaceLineEndings ( ) )
16381638 {
16391639 Log . WriteLine ( $ "File differs between MSBuild and CSC-only runs: { cscOnlyFile } ") ;
16401640 const int limit = 3_000 ;
1641- if ( cscOnlyFileBytes . Length < limit && msbuildFileBytes . Length < limit )
1641+ if ( cscOnlyFileText . Length < limit && msbuildFileText . Length < limit )
16421642 {
16431643 Log . WriteLine ( "MSBuild file content:" ) ;
1644- Log . WriteLine ( Encoding . UTF8 . GetString ( msbuildFileBytes ) ) ;
1644+ Log . WriteLine ( msbuildFileText ) ;
16451645 Log . WriteLine ( "CSC-only file content:" ) ;
1646- Log . WriteLine ( Encoding . UTF8 . GetString ( cscOnlyFileBytes ) ) ;
1646+ Log . WriteLine ( cscOnlyFileText ) ;
16471647 }
16481648 else
16491649 {
1650- Log . WriteLine ( $ "MSBuild file size: { msbuildFileBytes . Length } bytes ") ;
1651- Log . WriteLine ( $ "CSC-only file size: { cscOnlyFileBytes . Length } bytes ") ;
1650+ Log . WriteLine ( $ "MSBuild file size: { msbuildFileText . Length } chars ") ;
1651+ Log . WriteLine ( $ "CSC-only file size: { cscOnlyFileText . Length } chars ") ;
16521652 }
16531653 hasErrors = true ;
16541654 }
You can’t perform that action at this time.
0 commit comments