JuliaTesting / ReferenceTests.jl

Utility package for comparing data against reference files
https://juliatesting.github.io/ReferenceTests.jl/latest/
Other
82 stars 14 forks source link

ignore the difference between \n\r and \r? #39

Closed johnnychen94 closed 4 years ago

johnnychen94 commented 4 years ago

Just run into the following case, it's caused by Unix/Windows but I'm not very sure if these differences can be ignored in general. Should we ignore this by default or leave it to users?

Test for "section.txt" failed.
DIFF ------------------------
"""
- # Default\r
-   ## Subsection 1\r
-     card_1.md\r
-     card_2.md\r
-   ## Subsection 2\r
-     card_3.md\r
-     card_4.md\r
+ # Default
+   ## Subsection 1
+     card_1.md
+     card_2.md
+   ## Subsection 2
+     card_3.md
+     card_4.md
  """

IMO, since \r/\n\r difference is actually checkout with git add, I think ignoring this would be fine.