From 8e0694629aaedc886bbf2388d383d108a96999dd Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 12 Jun 2026 12:05:01 -0300 Subject: tests/remembering.go: Pin getopt(3) positional parsing The first operand ends the options, with or without "--": a wrapped command's option-looking argv tokens are never rewritten. Comes from gobang's ExpandBundles turning positional. Co-Authored-By: Claude Fable 5 --- tests/remembering.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/remembering.go b/tests/remembering.go index 5c3b705..53ca00f 100644 --- a/tests/remembering.go +++ b/tests/remembering.go @@ -528,6 +528,16 @@ func test_run_flow() { assertEq(rc, 0) assertEq(out, "-pz\n") }) + + testing("operands stop option parsing", func() { + rc, out, _ := runWith( + "", + "-p", "t10", + "sh", "-c", "echo \"$0\"", "-pz", + ) + assertEq(rc, 0) + assertEq(out, "-pz\n") + }) }) } -- cgit v1.3