Skip to content

Commit

Permalink
fix indent, capture diff value
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornregnell committed Jul 6, 2021
1 parent 1da59b1 commit 1778dc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions repl-test-update/run-insert-error.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def visitFile(path: String, isModify: Boolean): Unit =
then
result :+= "-- Error:"

val msg =
if lines == result then Console.GREEN + " unmodified" + Console.RESET
else Console.RED + " *** MODIFIED" + Console.RESET
val (msg, isDiff) =
if lines == result then (Console.GREEN + " unmodified" + Console.RESET, false)
else (Console.RED + " *** MODIFIED" + Console.RESET, true)
println(msg)
if lines != result then
if isDiff then
println("\nbefore ==========>\n" + lines.mkString("\n"))
println("\nafter ==========>\n" + result.mkString("\n"))
if isModify then
Expand Down

0 comments on commit 1778dc7

Please sign in to comment.