Skip to content

tool_operate: keep the filename for upload globbing#21401

Closed
bagder wants to merge 3 commits intomasterfrom
bagder/outfile
Closed

tool_operate: keep the filename for upload globbing#21401
bagder wants to merge 3 commits intomasterfrom
bagder/outfile

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Apr 21, 2026

Add test 2012 and 2013 to verify.

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Apr 21, 2026

Note that these tests now include and verify the #21402 "side-effect"

@bagder bagder marked this pull request as ready for review April 21, 2026 15:33
@bagder bagder requested a review from Copilot April 21, 2026 15:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes curl tool-side behavior so that an explicitly selected output filename is preserved across repeated transfers triggered by upload globbing, and adds regression tests plus test-suite support/documentation for asserting empty stdout.

Changes:

  • tool_operate: duplicate (strdup) the configured per-URL output filename into each transfer instead of transferring ownership (so it remains available for subsequent iterations).
  • Test harness: add %EMPTY support in <verify><stdout> to assert “stdout must be empty”, and document it.
  • Add new tests 2012/2013 covering upload globbing scenarios, and register them in the test Makefile.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tool_operate.c Keeps configured u->outfile intact across multiple transfers by copying it into per->outfile.
tests/runtests.pl Adds %EMPTY marker handling for <verify><stdout>.
docs/tests/FILEFORMAT.md Documents %EMPTY usage for verifying empty stdout.
tests/data/test2012 New regression test: URLs loaded from file + upload globbing.
tests/data/test2013 New regression test: multiple URLs on command line + upload globbing.
tests/data/Makefile.am Adds test2012/test2013 to the distributed test list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/data/test2012
Comment thread tests/data/test2013
Comment thread tests/runtests.pl
@bagder bagder closed this in dcf5356 Apr 21, 2026
@bagder bagder deleted the bagder/outfile branch April 21, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants