test_the_shebang_is_skipped¶
Tests › tests/test_hash_file_docs.py
What this test is for
Why it exists
`#!/usr/bin/env perl` is a kernel directive that happens to start with `#`. Including it makes every script's documentation begin with an interpreter path, which is noise in a corpus a reader searches by concept.
Given
- —
When
doc = extract_file_doc("scripts/generate_errors.pl", PERL)
Then
- ✓ doc does not contain "/usr/bin/env"
- ✓ doc.lstrip().startswith("Generate error.c") holds
tests/test_hash_file_docs.py:80 · its file's page
What it checks (2)
assert "/usr/bin/env" not in doc, docobservesextract_file_docviadocassert doc.lstrip().startswith("Generate error.c"), docobservesextract_file_docviadoc
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-008 measured