mirror of
https://github.com/bazel-contrib/bazel-lib
synced 2024-11-30 01:41:21 +00:00
896ee0c1f0
I recently enabled --test_verbose_timeout_warnings and that caused a bunch of warnings in our build. This fixes it, and adds a utility for us or others to make test-wrapping macros that set to short by default.
30 lines
1.1 KiB
Markdown
Executable file
Generated
30 lines
1.1 KiB
Markdown
Executable file
Generated
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
|
|
|
Helpers for making test assertions
|
|
|
|
<a id="assert_contains"></a>
|
|
|
|
## assert_contains
|
|
|
|
<pre>
|
|
assert_contains(<a href="#assert_contains-name">name</a>, <a href="#assert_contains-actual">actual</a>, <a href="#assert_contains-expected">expected</a>, <a href="#assert_contains-size">size</a>, <a href="#assert_contains-timeout">timeout</a>)
|
|
</pre>
|
|
|
|
Generates a test target which fails if the file doesn't contain the string.
|
|
|
|
Depends on bash, as it creates an sh_test target.
|
|
|
|
|
|
**PARAMETERS**
|
|
|
|
|
|
| Name | Description | Default Value |
|
|
| :------------- | :------------- | :------------- |
|
|
| <a id="assert_contains-name"></a>name | target to create | none |
|
|
| <a id="assert_contains-actual"></a>actual | Label of a file | none |
|
|
| <a id="assert_contains-expected"></a>expected | a string which should appear in the file | none |
|
|
| <a id="assert_contains-size"></a>size | the size attribute of the test target | <code>None</code> |
|
|
| <a id="assert_contains-timeout"></a>timeout | the timeout attribute of the test target | <code>None</code> |
|
|
|
|
|