Parameter Expansion (2/2) - #285
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: No-op
strings.Joinwrapping a single string variable- Replaced the no-op strings.Join([]string{command}, " ") with just command in all three files, and removed the unused strings import from stage_pex7.go.
Or push these changes by commenting:
@cursor push 8e86eea1c7
Preview (8e86eea1c7)
diff --git a/internal/stage_pex5.go b/internal/stage_pex5.go
--- a/internal/stage_pex5.go
+++ b/internal/stage_pex5.go
@@ -67,7 +67,7 @@
}
testCase := test_cases.CommandWithMultilineResponseTestCase{
- Command: strings.Join([]string{command}, " "),
+ Command: command,
MultiLineAssertion: assertions.NewMultiLineAssertion(expectedLines),
SuccessMessage: "✓ Received expected response",
}
diff --git a/internal/stage_pex6.go b/internal/stage_pex6.go
--- a/internal/stage_pex6.go
+++ b/internal/stage_pex6.go
@@ -76,7 +76,7 @@
}
testCase := test_cases.CommandWithMultilineResponseTestCase{
- Command: strings.Join([]string{command}, " "),
+ Command: command,
MultiLineAssertion: assertions.NewMultiLineAssertion(expectedLines),
SuccessMessage: "✓ Received expected response",
}
diff --git a/internal/stage_pex7.go b/internal/stage_pex7.go
--- a/internal/stage_pex7.go
+++ b/internal/stage_pex7.go
@@ -3,7 +3,6 @@
import (
"fmt"
"strconv"
- "strings"
"github.com/codecrafters-io/shell-tester/internal/assertions"
"github.com/codecrafters-io/shell-tester/internal/logged_shell_asserter"
@@ -55,7 +54,7 @@
}
testCase := test_cases.CommandWithMultilineResponseTestCase{
- Command: strings.Join([]string{command}, " "),
+ Command: command,
MultiLineAssertion: assertions.NewMultiLineAssertion(expectedLines),
SuccessMessage: "✓ Received expected response",
}You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit f556693. Configure here.
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.


Note
Low Risk
Changes are confined to test stages and golden fixtures; primary risk is increased flakiness if randomized names/values ever collide or produce edge-case tokens.
Overview
Adds concrete implementations for
testPEX5,testPEX6, andtestPEX7, replacing stubs with end-to-end tests that set variables viadeclareand then verify argument expansion when invoking a generatedsignature_printerexecutable.Stage 5 asserts basic
$VARexpansion into argv, stage 6 asserts brace form${VAR}including embedding within surrounding literals, and stage 7 asserts missing variables expand to an empty string (including inside a larger token). Updates the bash fixtureparameter_expansion/passto include the new expected transcripts (PATH setup, executable listing, and multiline argv output).Reviewed by Cursor Bugbot for commit 79a29ac. Bugbot is set up for automated code reviews on this repo. Configure here.