Skip to content

Commit

Permalink
?
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Jun 3, 2024
1 parent 5223a36 commit 808d03c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ class Examples extends munit.FunSuite {
val rawOutput = os.read(output, Charset.defaultCharset())

var updatedOutput = rawOutput
if (Properties.isWin)
updatedOutput = updatedOutput.replace("\\n", "\\r\\n")

// Clear metadata, that usually looks like
// "metadata": {
Expand All @@ -89,10 +87,14 @@ class Examples extends munit.FunSuite {
cell("metadata") = ujson.Obj()
updatedOutput = json.render(1)

if (Properties.isWin)
updatedOutput = updatedOutput.replace("\n", "\r\n").replace("\\n", "\\r\\n")

val result = updatedOutput.getBytes(Charset.defaultCharset())

// writing the updated notebook on disk for the diff below
os.write.over(output, updatedOutput.getBytes(Charset.defaultCharset()))

val result = os.read(output, Charset.defaultCharset())
val expected = os.read(notebook)

if (result != expected) {
Expand Down

0 comments on commit 808d03c

Please sign in to comment.