# Test Passing Locally but not in Remote

**URL:** <https://forum.codecrafters.io/t/test-passing-locally-but-not-in-remote/10677>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [May 17, 2025, 7:21pm UTC](https://forum.codecrafters.io/t/test-passing-locally-but-not-in-remote/10677 "2025-05-17T19:21:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kushagra1480](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/kushagra1480/32/10922_2.png) [@Kushagra1480](https://forum.codecrafters.io/u/Kushagra1480)\
**Post date:** [May 17, 2025, 7:21pm UTC](https://forum.codecrafters.io/t/test-passing-locally-but-not-in-remote/10677/1 "2025-05-17T19:21:49Z")

</div>

The remote test keeps failing for task #WH-6 of the autocompletion challenge.

I’ve verified that the TAB completion works locally but the test keeps failing for some reason

This is the test output:

```auto
remote: [tester::#GM9] Running tests for Stage #GM9 (Autocompletion - Completion with arguments)
remote: [tester::#GM9] Running ./your_program.sh
remote: [tester::#GM9] ✓ Received prompt ($ )
remote: [tester::#GM9] Typed "ech"
remote: [tester::#GM9] ✓ Prompt line matches "$ ech"
remote: [tester::#GM9] Pressed "<TAB>" (expecting autocomplete to "echo")
remote: [your-program] $ ech
remote: [tester::#GM9] Output does not match expected value.
remote: [tester::#GM9] Expected: "$ echo "
remote: [tester::#GM9] Received: "$ ech"
remote: [tester::#GM9] Assertion failed.
remote: [tester::#GM9] Test failed

```

My code can be found in the repo here [GitHub - Kushagra1480/w-shell](https://github.com/Kushagra1480/w-shell)

---

<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:** [May 18, 2025, 1:49am UTC](https://forum.codecrafters.io/t/test-passing-locally-but-not-in-remote/10677/3 "2025-05-18T01:49:01Z")

</div>

Hey @Kushagra1480, could you [upload your code to GitHub](https://docs.codecrafters.io/features/publish-to-github) and share the link? It will be much easier to debug if I can run it directly.

---

<div class="post-metadata">

**Author:** ![EshaanAgg](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/eshaanagg/32/399_2.png) [@EshaanAgg](https://forum.codecrafters.io/u/EshaanAgg)\
**Post date:** [May 18, 2025, 4:51pm UTC](https://forum.codecrafters.io/t/test-passing-locally-but-not-in-remote/10677/4 "2025-05-18T16:51:22Z")

</div>

Can confirm that the linked code does not work locally as of now. On typing “ech” and then clicking Tab once, no autocompletion is registered. On clicking Tab twice, I get back multiple completions:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/a/a3180c902787233dc8296e0b84db83f85abbd4c4.png)

The reason is you are concatenating both the built-in commands and the executables found in the `PATH` as a `slice` to get all possible completions. This breaks things, as `echo` is both an executable in the tester’s PATH, as well as a built-in command we have implemented in the previous stages. Deduplicating the commands should fix the same.

---

<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:** [May 25, 2025, 7:24am UTC](https://forum.codecrafters.io/t/test-passing-locally-but-not-in-remote/10677/5 "2025-05-25T07:24:16Z")

</div>

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

---

<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:** [May 30, 2025, 7:25am UTC](https://forum.codecrafters.io/t/test-passing-locally-but-not-in-remote/10677/6 "2025-05-30T07:25:02Z")

</div>

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