2021-09-24 15:24:43 +00:00
|
|
|
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
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).
|
|
|
|
|
2022-08-30 18:57:34 +00:00
|
|
|
<a id="diff_test"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-03-26 11:38:49 +00:00
|
|
|
## diff_test
|
|
|
|
|
|
|
|
<pre>
|
2022-04-06 19:16:14 +00:00
|
|
|
diff_test(<a href="#diff_test-name">name</a>, <a href="#diff_test-file1">file1</a>, <a href="#diff_test-file2">file2</a>, <a href="#diff_test-failure_message">failure_message</a>, <a href="#diff_test-kwargs">kwargs</a>)
|
2019-03-26 11:38:49 +00:00
|
|
|
</pre>
|
|
|
|
|
2019-05-08 14:34:47 +00:00
|
|
|
A test that compares two files.
|
2019-03-26 11:38:49 +00:00
|
|
|
|
2019-05-08 14:34:47 +00:00
|
|
|
The test succeeds if the files' contents match.
|
2019-03-26 11:38:49 +00:00
|
|
|
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
2019-03-26 11:38:49 +00:00
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
|
|
|
| <a id="diff_test-name"></a>name | The name of the test rule. | none |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="diff_test-file1"></a>file1 | Label of the file to compare to `file2`. | none |
|
|
|
|
| <a id="diff_test-file2"></a>file2 | Label of the file to compare to `file1`. | none |
|
|
|
|
| <a id="diff_test-failure_message"></a>failure_message | Additional message to log if the files' contents do not match. | `None` |
|
2022-10-03 09:13:46 +00:00
|
|
|
| <a id="diff_test-kwargs"></a>kwargs | The [common attributes for tests](https://bazel.build/reference/be/common-definitions#common-attributes-tests). | none |
|
2019-03-26 11:38:49 +00:00
|
|
|
|
2021-10-04 16:03:48 +00:00
|
|
|
|