# Test Issue with "Backslash within single quotes #le5" for Go

**URL:** <https://forum.codecrafters.io/t/test-issue-with-backslash-within-single-quotes-le5-for-go/9166>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [April 21, 2025, 5:48pm UTC](https://forum.codecrafters.io/t/test-issue-with-backslash-within-single-quotes-le5-for-go/9166 "2025-04-21T17:48:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![quartet4](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/quartet4/32/5529_2.png) [@quartet4](https://forum.codecrafters.io/u/quartet4)\
**Post date:** [April 21, 2025, 5:48pm UTC](https://forum.codecrafters.io/t/test-issue-with-backslash-within-single-quotes-le5-for-go/9166/1 "2025-04-21T17:48:58Z")

</div>

I’m getting a fail in the test script for something I think my program is parsing correctly. Why would the two quotes after **test** lead to one combined argument instead of two?

> Blockquote  
> remote: [your-program] $ echo “shell script” “test”“example”  
> remote: [your-program] shell script test example  
> remote: [tester::#TG6] Output does not match expected value.  
> remote: [tester::#TG6] Expected: “shell script testexample”  
> remote: [tester::#TG6] Received: “shell script test example”  
> remote: [your-program] $  
> remote: [tester::#TG6] Assertion failed.  
> remote: [tester::#TG6] Test failed

---

<div class="post-metadata">

**Author:** ![senevoldsen](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/senevoldsen/32/6460_2.png) [@senevoldsen](https://forum.codecrafters.io/u/senevoldsen)\
**Post date:** [April 21, 2025, 9:43pm UTC](https://forum.codecrafters.io/t/test-issue-with-backslash-within-single-quotes-le5-for-go/9166/3 "2025-04-21T21:43:00Z")

</div>

Because that is how the bash shell parses it.

Read number #2 on [Shell Operation (Bash Reference Manual)](https://www.gnu.org/software/bash/manual/html_node/Shell-Operation.html). “Tokens” are separated by (unquoted) metacharacters, but `"` is not a metacharacter, so `"test""example"` resolves to the piece `test` followed by `example`, and since there is no space (metacharacter) between they become one single token `testexample`.

---

<div class="post-metadata">

**Author:** ![quartet4](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/quartet4/32/5529_2.png) [@quartet4](https://forum.codecrafters.io/u/quartet4)\
**Post date:** [April 22, 2025, 11:51am UTC](https://forum.codecrafters.io/t/test-issue-with-backslash-within-single-quotes-le5-for-go/9166/4 "2025-04-22T11:51:20Z")

</div>

Thanks for the explanation! 🙏

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [April 27, 2025, 11:52am UTC](https://forum.codecrafters.io/t/test-issue-with-backslash-within-single-quotes-le5-for-go/9166/5 "2025-04-27T11:52:11Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
