2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-30 01:41:21 +00:00
bazel-lib/docs/diff_test.md
2022-12-03 11:32:37 -08:00

1.6 KiB
Generated

A test rule that compares two binary files or two directories.

Similar to bazel-skylib's diff_test but also supports comparing directories.

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, size, timeout, 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 <code>file2</code>. none
file2 Label of the file to compare to <code>file1</code>. none
size standard attribute for tests None
timeout standard attribute for tests. Defaults to "short" if both timeout and size are unspecified. None
kwargs The <a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>. none