2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-28 21:33:48 +00:00
bazel-lib/docs/testing.md
Alex Eagle 20d759f669 feat: add utility for asserting that a file contains a string
Useful for basic smoke tests of bazel outputs
2022-08-04 18:02:29 -07:00

806 B
Executable file
Generated

Helpers for making test assertions

assert_contains

assert_contains(name, actual, expected)

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
name target to create none
actual Label of a file none
expected a string which should appear in the file none