test_both_spellings_of_a_shell_function_are_definitions¶
Tests › tests/test_shast.py
What this test is for
Why it exists
`name()` and `function name` are the two forms POSIX sh and bash accept.
Given
out = _harvest(_SCRIPT)by_name = {fn["name"]: fn for fn in out["functions"]}
When
- —
Then
- ✓ sorted(by_name) equals ["deploy", "rollback"]
- ✓ by_name["deploy"]["line"] equals 6
- ✓ by_name["deploy"]["end"] equals 9
- ✓ by_name["rollback"]["line"] equals 12
tests/test_shast.py:69 · its file's page
What it checks (4)
assert sorted(by_name) == ["deploy", "rollback"]not attributedassert by_name["deploy"]["line"] == 6not attributedassert by_name["deploy"]["end"] == 9not attributedassert by_name["rollback"]["line"] == 12not attributed
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
test_both_spellings_of_a_shell_function_are_definitions→_harvestWhat 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-012 measured