File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -186,9 +186,17 @@ func assertOutput(
186186 print ( " ==== --------------------------------------------------------------- " )
187187 print ( " Got output: " )
188188 let printFromLineNo = matchingOutputOffset
189- let printToLineNo = matchingOutputOffset + expectedLines. count
190- for (n, g) in gotLines. enumerated ( ) where n >= printFromLineNo && n <= printToLineNo {
191- print ( " \( n) : \( g) " . red ( if: diffLineNumbers. contains ( n) ) )
189+ for (n, g) in gotLines. enumerated ( ) where n >= printFromLineNo {
190+ let baseLine = " \( n) : \( g) "
191+ var line = baseLine
192+ if diffLineNumbers. contains ( n) {
193+ line += " \n "
194+ let leadingCount = " \( n) : " . count
195+ let message = " \( String ( repeating: " " , count: leadingCount) ) \( String ( repeating: " ^ " , count: 8 ) ) EXPECTED MATCH OR SEARCHING FROM HERE "
196+ line += " \( message) \( String ( repeating: " ^ " , count: max ( 0 , line. count - message. count) ) ) "
197+ line = line. red
198+ }
199+ print ( line)
192200 }
193201 print ( " ==== --------------------------------------------------------------- \n " )
194202 }
You can’t perform that action at this time.
0 commit comments