Left to Prove | test Evaluate string predicates Status: Open Seeds: 2000 Category: Predicates and status Invocation: test -n STRING / test -z STRING Input domain: Take exactly one of the two unary operators and one NUL-free operand. Proof obligation: Return 0 when the chosen predicate holds and 1 otherwise. Both output streams stay empty. Test cases: Empty strings, whitespace, operators used as operands, and multibyte values. Outside this profile: Other operators, filesystem predicates, bracket syntax, and malformed expressions. Specification: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html Reference: https://www.gnu.org/software/coreutils/manual/html_node/test-invocation.html Reference source: https://github.com/coreutils/coreutils/blob/v9.11/src/test.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/test.json Implementation replay command: sh targets/test/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: test Contribution: proof Contribution guidelines: https://lefttoprove.com/join.txt