test: cover ipfs get paths containing closing bracket - #11359
Merged
lidel merged 6 commits intoJun 30, 2026
Conversation
3 tasks
Contributor
|
Triage note:
|
lidel
requested changes
Jun 9, 2026
| }) | ||
|
|
||
| t.Run("CID with closing bracket path segment is converted correctly", func(t *testing.T) { | ||
| cidWithPath := "QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/]" |
Contributor
There was a problem hiding this comment.
@purusachdeva this PR should likely use a matrix to test more than just this one character, could you add other ones that could cause problems across linux/windows/macos filesystems
Contributor
Author
There was a problem hiding this comment.
@lidel Thanks! I updated this to use a matrix of punctuation path segments that are valid across Linux, Windows, and macOS filesystems. The sharness test now covers both DAG creation via ipfs add -r and DAG read via ipfs get "$CID/$name" for those segments.
purusachdeva
force-pushed
the
fix-9369-get-closing-bracket-test
branch
from
June 9, 2026 19:57
40dcdc6 to
0497a0f
Compare
ipfs get must retrieve UnixFS paths whose segments contain punctuation that is valid on Linux, macOS, and Windows but is sensitive to a POSIX shell (issue ipfs#9369, where a "]" segment failed). AGENTS.md prefers test/cli for new integration tests, and driving ipfs directly avoids the shell-quoting limits of the sharness loop. - add test/cli/get_test.go: add a directory with one file per segment, then get each "<cid>/<segment>" and compare bytes, exercised both offline and against a daemon - cover the apostrophe segment, which the single-quoted sharness test body could not include - drop the now-redundant punctuation block from t0090-get.sh
lidel
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds regression coverage for #9369.
This verifies that
ipfs getcan retrieve a UnixFS path whose final path segment is], both through the command path parser and the sharnessipfs getflow.