Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Properly handle newlines in diff results #432

Conversation

UnaiUribarri-TomTom
Copy link
Contributor

Apply colors to each line of diff result and indent it correctly.

Apply colors to each line of diff result and indent it correctly.
@ghostbuster91
Copy link
Collaborator

Hi, thanks for the PR!

Looks good, one small thing - could you add some test cases to prevent us running into some regression in the future? The output is tested here https://github.com/softwaremill/diffx/blob/master/core/src/test/scala/com/softwaremill/diffx/test/DiffResultTest.scala

@UnaiUribarri-TomTom
Copy link
Contributor Author

Hi, thanks for the PR!

Looks good, one small thing - could you add some test cases to prevent us running into some regression in the future? The output is tested here https://github.com/softwaremill/diffx/blob/master/core/src/test/scala/com/softwaremill/diffx/test/DiffResultTest.scala

Yes, I will expand the PR with some test.

@UnaiUribarri-TomTom
Copy link
Contributor Author

I realise that the root issue was that I was comparing lists of Protobuf objects, that have a custom toString method that produced multiline output (I cannot control it, it is a Protobuf decision).

@ghostbuster91 ghostbuster91 force-pushed the improve-results-coloring-and-indenting branch from f732d86 to 367d04b Compare April 8, 2023 09:01
@ghostbuster91 ghostbuster91 merged commit dbbc598 into softwaremill:master Apr 8, 2023
@ghostbuster91
Copy link
Collaborator

released as 0.8.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants