Skip to content

Commit 54bc945

Browse files
authored
Merge pull request #169 from codecrafters-io/andy/fix
Remove single quotes in #gu3 Backslash within double quotes
2 parents 62cded6 + 2a6f8a5 commit 54bc945

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

internal/stage_q5.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func testQ5(stageHarness *test_case_harness.TestCaseHarness) error {
5252
fmt.Sprintf(`echo "%s'%s'\\'%s"`, L[0], L[1], L[2]),
5353
fmt.Sprintf(`echo "%s\"insidequotes"%s\"`, L[0], L[1]),
5454
fmt.Sprintf(`echo "mixed\"quote'%s'\\"`, L[4]),
55-
fmt.Sprintf(`%s '%s' '%s' '%s'`, CUSTOM_CAT_COMMAND, filePaths[0], filePaths[1], filePaths[2]),
55+
fmt.Sprintf(`%s %q %q %q`, CUSTOM_CAT_COMMAND, filePaths[0], filePaths[1], filePaths[2]),
5656
}
5757
expectedOutputs := []string{
5858
fmt.Sprintf(`%s'%s'\'%s`, L[0], L[1], L[2]),

internal/test_helpers/fixtures/ash/quoting/pass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Debug = true
9999
[your-program] $ echo "mixed\"quote'script'\\"
100100
[your-program] mixed"quote'script'\
101101
[tester::#GU3] ✓ Received expected response
102-
[your-program] $ cat '/tmp/rat/"f 38"' '/tmp/rat/"f\93"' '/tmp/rat/f57'
102+
[your-program] $ cat "/tmp/rat/\"f 38\"" "/tmp/rat/\"f\\93\"" "/tmp/rat/f57"
103103
[your-program] banana pineapple.raspberry blueberry.apple pineapple.
104104
[tester::#GU3] ✓ Received expected response
105105
[your-program] $

internal/test_helpers/fixtures/bash/quoting/pass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Debug = true
9999
[your-program] $ echo "mixed\"quote'script'\\"
100100
[your-program] mixed"quote'script'\
101101
[tester::#GU3] ✓ Received expected response
102-
[your-program] $ cat '/tmp/rat/"f 38"' '/tmp/rat/"f\93"' '/tmp/rat/f57'
102+
[your-program] $ cat "/tmp/rat/\"f 38\"" "/tmp/rat/\"f\\93\"" "/tmp/rat/f57"
103103
[your-program] banana pineapple.raspberry blueberry.apple pineapple.
104104
[tester::#GU3] ✓ Received expected response
105105
[your-program] $

0 commit comments

Comments
 (0)