# kache-e2e fixture: verifies `[cache].exclude` bypasses a C source path.
#
# The compile step (`cc -c src/foo.c`) is cacheable in c-hello. Here the
# fixture-local `.kache.toml` excludes that source path, so builds still
# succeed but no cacheable entries are reported.

name = "e2e-exclude-c"
tags = ["suite:e2e", "lang:cc", "mode:exclude"]

# Exempt from `--negative-control`: this fixture's contract is a
# negative — `max_entries_after = 0`, "kache caches nothing here"
# (the source is excluded). That holds whether kache is excluding,
# enabled, or disabled, so it legitimately still passes under
# KACHE_DISABLED=1 — there is no caching assertion to flip to fail.
negative_control_exempt = true

[source]
kind = "fixture"
path = "source"

[env]
CC = "$KACHE cc"

[commands]
build = "make"
clean = "make clean"

[verify]
run = "./build/foo"
expected_stdout_contains = ["exclude c ok"]

[assertions.cold]
max_entries_after = 0

[assertions.warm]
max_entries_after = 0

[assertions.noop]
should_not_recompile = false
