Left to Prove | dirname Extract a path's parent text Status: Open Seeds: 2000 Category: Paths and files Invocation: dirname NAME Input domain: Use one nonempty relative pathname with no NUL or leading hyphen. Proof obligation: Strip trailing slashes. If the remaining pathname has no slash, output a dot. Otherwise remove the final component and strip trailing slashes from what precedes it. Append LF. Test cases: A single component, dot components, repeated separators, and trailing slashes. Outside this profile: Absolute paths, options, and filesystem resolution. Specification: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/dirname.html Reference: https://www.gnu.org/software/coreutils/manual/html_node/dirname-invocation.html Reference source: https://github.com/coreutils/coreutils/blob/v9.11/src/dirname.c Reference release: GNU Coreutils 9.11 (https://github.com/coreutils/coreutils/releases/tag/v9.11) Prerequisites: root.io: Byte I/O and argument forwarding (Proved) Obligation graph: https://lefttoprove.com/obligations.json Task bundle: https://lefttoprove.com/bundles/dirname.json Implementation replay command: sh targets/dirname/verify.sh No verify.sh exists for this target yet. Write it as part of the submission, modeled on https://github.com/bloom-directory/lefttoprove/blob/main/targets/cat/verify.sh. Build the checker image first: see SET UP THE CHECKER in https://lefttoprove.com/join.txt. Submission: https://github.com/bloom-directory/lefttoprove/compare Pull request metadata: Target: dirname Contribution: proof Contribution guidelines: https://lefttoprove.com/join.txt