2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-30 10:41:18 +00:00
bazel-skylib/docs/diff_test_doc.md
Alexandre Rostovtsev 99ffbbf8a4
Prepare release 1.6.0 (#496)
And take the opportunity to reformat docs using a more modern Stardoc release
2024-04-24 17:40:06 -04:00

1.2 KiB
Executable file

A test rule that compares two binary files.

The rule uses a Bash command (diff) on Linux/macOS/non-Windows, and a cmd.exe command (fc.exe) on Windows (no Bash is required).

diff_test

diff_test(name, file1, file2, failure_message, kwargs)

A test that compares two files.

The test succeeds if the files' contents match.

PARAMETERS

Name Description Default Value
name The name of the test rule. none
file1 Label of the file to compare to file2. none
file2 Label of the file to compare to file1. none
failure_message Additional message to log if the files' contents do not match. None
kwargs The common attributes for tests. none