diff options
| author | EuAndreh <eu@euandre.org> | 2026-06-12 12:05:01 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2026-06-12 12:05:01 -0300 |
| commit | 8e0694629aaedc886bbf2388d383d108a96999dd (patch) | |
| tree | d0d3c3f10a90d47aab04b40fbac63990ed47be73 /tests/remembering.go | |
| parent | Accept getopts-style attached -pPROFILE again (diff) | |
| download | remembering-8e0694629aaedc886bbf2388d383d108a96999dd.tar.gz remembering-8e0694629aaedc886bbf2388d383d108a96999dd.tar.xz | |
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 <noreply@anthropic.com>
Diffstat (limited to 'tests/remembering.go')
| -rw-r--r-- | tests/remembering.go | 10 |
1 files changed, 10 insertions, 0 deletions
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") + }) }) } |
