Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/private/collection_subject.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,9 @@ def _collection_subject_contains_none_of(self, values):
self: implicitly added
values: ([`collection`]) values of which none of are allowed to exist.
"""
values = to_list(values)
if self.format:
values = self.meta.format_str(values)
values = [self.meta.format_str(v) for v in values]
check_contains_none_of(
collection = self.actual,
none_of = values,
Expand Down
17 changes: 17 additions & 0 deletions tests/truth_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ def _action_subject_test(env, target):
msg = "check argv success",
)

subject.argv().contains_none_of([
"arg1",
"arg3",
"{bindir}/{package}/input.gen.txt",
])
_assert_failure(
fake_env,
[
"expected not to contain any of",
"but 2 found",
"arg1",
"input.gen.txt",
],
env = env,
msg = "check contains_none_of failure",
)

subject.contains_flag_values([
("--missingflag", "whatever"),
("--arg1flag", "wrongvalue"),
Expand Down