# Incorrect test on EZ5 stage

**URL:** <https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [May 24, 2024, 8:49pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496 "2024-05-24T20:49:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnomeby](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/gnomeby/32/85_2.png) [@gnomeby](https://forum.codecrafters.io/u/gnomeby)\
**Post date:** [May 24, 2024, 8:49pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496/1 "2024-05-24T20:49:56Z")

</div>

I’m stuck on Stage #EZ5.

Here are my logs:

```auto
Expected output to contain "nonexistent not found\\n", got "nonexistent: command not found\r\n$ "

```

“nonexistent not found” is incorrect answer for real console.

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [May 24, 2024, 9:14pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496/2 "2024-05-24T21:14:45Z")

</div>

@gnomeby nice catch! I’ve updated the instructions. The test expectations are correct (we run them against bash, zsh and dash to be sure):

 ![Screenshot 2024-05-24 at 22.11.37](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/1X/0fc3ec2af2afc39575981c9025e05c4cdce22373.png)

Commit with instruction changes:

> <https://github.com/codecrafters-io/build-your-own-shell/commit/35dd340f32a388d7985c5f114e798c7a8f561ac5>
>
> Thanks to @gnomeby for highlighting this!

---

<div class="post-metadata">

**Author:** ![gnomeby](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/gnomeby/32/85_2.png) [@gnomeby](https://forum.codecrafters.io/u/gnomeby)\
**Post date:** [May 24, 2024, 9:19pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496/3 "2024-05-24T21:19:55Z")

</div>

My Gentoo:

```bash
type erer
bash: type: erer: not found

```

bash 5.1\_p16-r6

and

```sh
sh-5.1$ type erer
sh: type: erer: not found

```

But OK I can use your variant.

---

<div class="post-metadata">

**Author:** ![gnomeby](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/gnomeby/32/85_2.png) [@gnomeby](https://forum.codecrafters.io/u/gnomeby)\
**Post date:** [May 24, 2024, 9:22pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496/4 "2024-05-24T21:22:45Z")

</div>

dash 0.5.12

```dash
# type r
r: not found

```

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [May 24, 2024, 9:22pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496/5 "2024-05-24T21:22:59Z")

</div>

Aha… Looks like we’ve handled this in tests to make it compatible with all shells:

> <https://github.com/codecrafters-io/shell-tester/blob/925d3b08b9e4d390fe3abc9cf0885b79a912def1/internal/stage6.go#L43>

I assume bash is far more widely used than zsh, so I think we’ll use the format you shared in the instructions then. Thanks for highlighting this, will update in the instructions!

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [June 10, 2024, 1:04pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496/8 "2024-06-10T13:04:09Z")

</div>

Fixed!

> <https://github.com/codecrafters-io/shell-tester/pull/22/files>

---

<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:** [June 15, 2024, 1:05pm UTC](https://forum.codecrafters.io/t/incorrect-test-on-ez5-stage/496/9 "2024-06-15T13:05:06Z")

</div>

Closed on June 15, 2024, 1:05pm UTC

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