Skip to content

Commit d2d5736

Browse files
committed
fix indent, capture diff value
1 parent abd5af4 commit d2d5736

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

repl-test-update/run-insert-error.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def visitFile(path: String, isModify: Boolean): Unit =
2828
then
2929
result :+= "-- Error:"
3030

31-
val msg =
32-
if lines == result then Console.GREEN + " unmodified" + Console.RESET
33-
else Console.RED + " *** MODIFIED" + Console.RESET
31+
val (msg, isDiff) =
32+
if lines == result then (Console.GREEN + " unmodified" + Console.RESET, false)
33+
else (Console.RED + " *** MODIFIED" + Console.RESET, true)
3434
println(msg)
35-
if lines != result then
35+
if isDiff then
3636
println("\nbefore ==========>\n" + lines.mkString("\n"))
3737
println("\nafter ==========>\n" + result.mkString("\n"))
3838
if isModify then

0 commit comments

Comments
 (0)