# Rust #EZ5 -- can not pass type echo test

**URL:** <https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [March 20, 2025, 4:29am UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191 "2025-03-20T04:29:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shriwati](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/shriwati/32/7498_2.png) [@shriwati](https://forum.codecrafters.io/u/shriwati)\
**Post date:** [March 20, 2025, 4:29am UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/1 "2025-03-20T04:29:02Z")

</div>

Code work fine locally but the test is failing..  
log below :  
[tester::#EZ5] Running tests for Stage #EZ5 (The type builtin: builtins)

[tester::#EZ5] Running ./your\_program.sh

[your-program] $ type echo

[your-program] echo not found

[tester::#EZ5] Output does not match expected value.

[tester::#EZ5] Expected: “echo is a shell builtin”

[tester::#EZ5] Received: “echo not found”

[your-program] $

[tester::#EZ5] Assertion failed.

[tester::#EZ5] Test failed

---

<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:** [March 20, 2025, 4:30am UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/3 "2025-03-20T04:30:20Z")

</div>

Hey @shriwati, 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:** ![shriwati](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/shriwati/32/7498_2.png) [@shriwati](https://forum.codecrafters.io/u/shriwati)\
**Post date:** [March 20, 2025, 4:58am UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/4 "2025-03-20T04:58:53Z")

</div>

see if you can access it.

[https://github.com/shriwati/rust/compare/main...code\_crafters](https://github.com/shriwati/rust/compare/main...code_crafters)

---

<div class="post-metadata">

**Author:** ![akhilesh-kumar-verma](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/akhilesh-kumar-verma/32/7386_2.png) [@akhilesh-kumar-verma](https://forum.codecrafters.io/u/akhilesh-kumar-verma)\
**Post date:** [March 20, 2025, 8:22am UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/6 "2025-03-20T08:22:10Z")

</div>

Nope. I says you have no Public Repos. XD  
Make sure you upload as public.

---

<div class="post-metadata">

**Author:** ![shriwati](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/shriwati/32/7498_2.png) [@shriwati](https://forum.codecrafters.io/u/shriwati)\
**Post date:** [March 20, 2025, 12:56pm UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/8 "2025-03-20T12:56:11Z")

</div>

Apologies, please try again, made public.

> **[Comparing main...code\_crafters · shriwati/rust](https://github.com/shriwati/rust/compare/main...code_crafters)**
>
> Contribute to shriwati/rust development by creating an account on GitHub.

Thanks in advance.

---

<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:** [March 20, 2025, 3:14pm UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/10 "2025-03-20T15:14:57Z")

</div>

@shriwati Trying to delegate the task to `type` somewhat defeats the purpose of implementing the type command yourself.

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

Additionally, matching `"echo" | "type" | "exit"` is sufficient to determine if a command is built-in.

Let me know if you need further clarification!

---

<div class="post-metadata">

**Author:** ![shriwati](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/shriwati/32/7498_2.png) [@shriwati](https://forum.codecrafters.io/u/shriwati)\
**Post date:** [March 20, 2025, 3:46pm UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/12 "2025-03-20T15:46:36Z")

</div>

is that why you think test is failing ? I mean this code works fine locally. Btw, I just changed type to cmd.0. yeah based on this, i have to decide if I should sign up for their yearly subscription. I am desperately looking for some hands on exercises on Rust, which I really like. 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:** [March 30, 2025, 4:42pm UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/13 "2025-03-30T16:42:53Z")

</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:** [April 4, 2025, 4:43pm UTC](https://forum.codecrafters.io/t/rust-ez5-can-not-pass-type-echo-test/7191/14 "2025-04-04T16:43:04Z")

</div>

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