Skip to content

test-arg-flag-values.sh enumerates its scripts by hand, so a new tool is untested there and nothing says so #188

Description

@fdaviddpt

Found while adding scripts/jit-doctor.sh in #183 (PR #185).

tests/test-arg-flag-values.sh sweeps every tool for the missing-flag-value case. Its header says a flag added later is covered without anyone having to remember — and that is true of flags and false of scripts: drive_script() is called from a hand-written list, so a new tool under scripts/ is silently untested by that suite until somebody adds a line.

#183 added the jit-doctor.sh line and a comment naming the gap. The gap itself is open.

The suite that already solved this is tests/test-dogfood-entries.sh, which enumerates git ls-files -- scripts and goes red on a script with no rule. Doing the same here makes the header's claim true of both halves.

Why it is worth doing rather than remembering

A missing line in a hand-written list produces a passing suite with one fewer script in it. Nothing errors, the totals go up as assertions are added elsewhere, and the coverage that was lost is invisible in every number the suite prints — the same absence-read-as-a-pass this repository exists to name, in its own test tree.

The one thing a fix has to decide

What to do about a script that legitimately takes no flags. Enumeration turns "not in the list" into "must be driven", so a tool with no flag arguments needs either an explicit skip that names itself, or a sweep that treats "no flags" as a pass it can distinguish from "never ran".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lane-teststests/ and .github/workflowspriority-lowWorth doing, loses every tiebreak

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions