# Backslash outside quotes #YT5 - Extra space in a test output

**URL:** <https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661>\
**Category:** General\
**Tags:** challenge:shell\
**Created:** [February 4, 2025, 6:48pm UTC](https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661 "2025-02-04T18:48:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hereisk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/hereisk/32/4742_2.png) [@hereisk](https://forum.codecrafters.io/u/hereisk)\
**Post date:** [February 4, 2025, 6:48pm UTC](https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661/1 "2025-02-04T18:48:23Z")

</div>

Hello!

There is either an error in the test or I am misunderstanding the logic here.

 ![Screenshot 2025-02-04 at 10.44.58 AM](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/f/fe58ad66e6d41f2b55e4e7192f44aa306041c20b.png)

In the input `echo "example hello" "script""world"` there are two spaces between “example hello” and “script”. Since the double space takes place outside of the quotation marks in the output there should be just one. But the expected output of the test still has 2.

Am I missing something or is there an error in the test?

Thanks!

---

<div class="post-metadata">

**Author:** ![hereisk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/hereisk/32/4742_2.png) [@hereisk](https://forum.codecrafters.io/u/hereisk)\
**Post date:** [February 4, 2025, 6:48pm UTC](https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661/2 "2025-02-04T18:48:56Z")

</div>

Here is the output I get if I run the command in my terminal

 ![Screenshot 2025-02-04 at 10.48.33 AM](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/7/71e2a995089d5f18b19a27c8367b0973c6750609.png)

---

<div class="post-metadata">

**Author:** ![hereisk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/hereisk/32/4742_2.png) [@hereisk](https://forum.codecrafters.io/u/hereisk)\
**Post date:** [February 4, 2025, 9:11pm UTC](https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661/4 "2025-02-04T21:11:21Z")

</div>

@andy1li it’d be great if you can have a look. thanks 🙏

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [February 5, 2025, 10:02am UTC](https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661/5 "2025-02-05T10:02:41Z")

</div>

Hi @hereisk, you’re absolutely right. There should be only one space between `hello` and `scriptworld` in the expected output, which is exactly what our tester expects (green):

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/3/3715d11fe4fcbf945e7abf762f36e79eb130dc82.jpeg)

The test case is failing because the tester actually received two spaces instead (red).

Let me know if you’d like me to take a look at your code to troubleshoot the issue.

---

<div class="post-metadata">

**Author:** ![hereisk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/hereisk/32/4742_2.png) [@hereisk](https://forum.codecrafters.io/u/hereisk)\
**Post date:** [February 5, 2025, 3:17pm UTC](https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661/7 "2025-02-05T15:17:43Z")

</div>

I am not sure where I was looking. Sorry. And thank you

---

<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:** [February 10, 2025, 3:18pm UTC](https://forum.codecrafters.io/t/backslash-outside-quotes-yt5-extra-space-in-a-test-output/4661/8 "2025-02-10T15:18:30Z")

</div>

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