Rust #EZ5 -- can not pass type echo test

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

Hey @shriwati, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

see if you can access it.

https://github.com/shriwati/rust/compare/main...code_crafters

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

Apologies, please try again, made public.

Thanks in advance.

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

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

Let me know if you need further clarification!

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.

1 Like

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

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