Skip to content

Make the jq Carriage-Return Test Fail When Its Stub Is Not Reached #2513

Closed

Description

@ptr727

What happens

ArchivedRepositoryCase.test_a_trailing_carriage_return_from_jq_is_stripped in tests/test_configure_archived.py prepends a jq stub that prints archived\r, to prove that configure.sh's archived check strips a trailing carriage return. The test's registry fixture also says "status": "archived". So whenever the stub is not reached, any real jq on PATH produces the same verdict, and the test still passes:

  • A Linux jq prints plain archived.
  • A Windows-native jq prints archived\r, which the lifted sed strips.

Running the test's exact script with an empty stub directory returns 0, prints "so check makes none and stops here", and never reaches REACHED_NEXT. That holds on Linux and on Windows under Git Bash. This is how a stub-discovery defect on Windows, fixed in #2508, went unnoticed: the test passed without the stub from a working directory on another drive.

Done means

  • The fixture gives the registry a status other than archived, for example cataloged, so the stop can only come from the stub's archived\r.
  • The test fails when the stub is not on PATH.

Found by a local review pass on #2508. Refs #2488.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions