Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aspect.build/llms.txt

Use this file to discover all available pages before exploring further.

Documentation for @bazel_lib@v3.2.0 View source
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). See also: rules_diff

Function: diff_test

A test that compares two files. The test succeeds if the files’ contents match.

Parameters

name
name
required
The name of the test rule.
file1
name
required
Label of the file to compare to file2.
file2
name
required
Label of the file to compare to file1, or a list of strings which are the lines to expect file1 to contain.
diff_args
name
default:"[]"
Arguments to pass to the diff command. (Ignored on Windows)
size
name
default:"small"
standard attribute for tests
kwargs
string_list