Skip to content

Commit

Permalink
v.util: make diff_test.v more robust to the color settings for the ch…
Browse files Browse the repository at this point in the history
…osen local diff tool
  • Loading branch information
spytheman committed May 6, 2024
1 parent 6425de8 commit d3c29ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vlib/v/util/diff/diff_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ fn test_compare_files() {
// Test deprecated
assert res == diff.color_compare_files('diff', p1, p2)
// Test again using `find_working_diff_command()`.
assert res == diff.color_compare_files(diff.find_working_diff_command()!, p1, p2)
zzz := diff.color_compare_files(diff.find_working_diff_command()!, p1, p2)
assert term.strip_ansi(res) == term.strip_ansi(zzz)

// Test custom options.
res = diff.compare_files(p1, p2, tool: .diff, args: '-U 2 -i')!
Expand Down

0 comments on commit d3c29ef

Please sign in to comment.