# Tests are contradictory

**URL:** https://forum.codecrafters.io/t/tests-are-contradictory/3529
**Category:** Bug Reports
**Tags:** challenge:shell
**Created:** [December 18, 2024, 3:49pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529 "2024-12-18T15:49:56Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Swayam04](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/swayam04/32/1905_2.png) [@Swayam04](https://forum.codecrafters.io/u/Swayam04)
#### Post date: [December 18, 2024, 3:49pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529/1 "2024-12-18T15:49:56Z")

</div>

Stage MG5 and NI6 are contradictory. MG5 uses common shell command names to search in provided path and expects a different response than a shell built-in. However, in NI6 one of these commands (cat) ends up becoming a shell built-in. Ideally, ‘is a shell built in’ should be the expected type command response for cat, but the earlier MG5 tests expect it to be different (cat is /path/to/cat).

This should be fixed IMO.

---

<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: [December 18, 2024, 4:17pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529/2 "2024-12-18T16:17:32Z")

</div>

Could you clarify where it says that cat is expected to be a shell built-in? Iirc the tester always expects cat to be an executable.

---

<div class="post-metadata">

### Author: ![Swayam04](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/swayam04/32/1905_2.png) [@Swayam04](https://forum.codecrafters.io/u/Swayam04)
#### Post date: [December 18, 2024, 5:02pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529/3 "2024-12-18T17:02:19Z")

</div>

It doesn’t but it is also not clearly mentioned to treat it as an executable. I realized that in subsequent stages (which I completed just now) but initially assumed it to be a new command to support and read the files provided in its arguments manually.

---

<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: [December 25, 2024, 5:28pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529/4 "2024-12-25T17:28:14Z")

</div>

We’ll keep an eye out for similar reports - haven’t seen anyone else mention this so far (checked forum + the in-app feedback).

---

<div class="post-metadata">

### Author: ![AryanJindal7](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/aryanjindal7/32/3710_2.png) [@AryanJindal7](https://forum.codecrafters.io/u/AryanJindal7)
#### Post date: [December 28, 2024, 2:36pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529/7 "2024-12-28T14:36:23Z")

</div>

Hi Same issue is faced by me

[tester::#MG5] Running tests for Stage #MG5 (The type builtin: executable files)  
[tester::#MG5] Running ./your\_program.sh  
[your-program] $ type cat  
[your-program] cat is a shell builtin  
[tester::#MG5] Output does not match expected value.  
[tester::#MG5] Expected: “cat is /bin/cat”  
[tester::#MG5] Received: “cat is a shell builtin”  
[your-program] $  
[tester::#MG5] Assertion failed.  
[tester::#MG5] 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: [December 29, 2024, 8:26pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529/9 "2024-12-29T20:26:59Z")

</div>

Hi @AryanJindal7, looks like you’ve got past this stage — do you happen to remember what was wrong? Would love to see if we can improve the tester / instructions.

---

<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: [January 5, 2025, 8:28pm UTC](https://forum.codecrafters.io/t/tests-are-contradictory/3529/11 "2025-01-05T20:28:05Z")

</div>

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