# OL4 test fails although the output seems correct

**URL:** <https://forum.codecrafters.io/t/ol4-test-fails-although-the-output-seems-correct/8510>\
**Category:** Challenges\
**Tags:** challenge:interpreter\
**Created:** [April 9, 2025, 7:10pm UTC](https://forum.codecrafters.io/t/ol4-test-fails-although-the-output-seems-correct/8510 "2025-04-09T19:10:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![z4nsh1n](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/z4nsh1n/32/8913_2.png) [@z4nsh1n](https://forum.codecrafters.io/u/z4nsh1n)\
**Post date:** [April 9, 2025, 7:10pm UTC](https://forum.codecrafters.io/t/ol4-test-fails-although-the-output-seems-correct/8510/1 "2025-04-09T19:10:32Z")

</div>

My program outputs the exact line including the 2 spaces but does not pass the test. I have no idea what’s wrong.

remote: [tester::#OL4] Running tests for Stage #OL4 (Scanning: Parentheses)  
remote: [tester::#OL4] [test-1] Running test case: 1  
remote: [tester::#OL4] [test-1] Writing contents to ./test.lox:  
remote: [tester::#OL4] [test-1.lox] (  
remote: [tester::#OL4] [test-1] $ ./your\_program.sh tokenize test.lox  
remote: [your\_program] LEFT\_PAREN ( null  
remote: [tester::#OL4] [test-1] ✓ LEFT\_PAREN ( null  
remote: [tester::#OL4] [test-1] ? EOF null  
remote: [tester::#OL4] [test-1] Expected line #2 on stdout to be “EOF null”, but didn’t find line  
remote: [tester::#OL4] [test-1] Test failed (try setting ‘debug: true’ in your codecrafters.yml to see more details)

---

<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:** [April 9, 2025, 7:34pm UTC](https://forum.codecrafters.io/t/ol4-test-fails-although-the-output-seems-correct/8510/3 "2025-04-09T19:34:53Z")

</div>

Hey @z4nsh1n, it looks the output is missing the expected `EOF null`.

If you’d like me to take closer look, please [upload your code to GitHub](https://docs.codecrafters.io/features/publish-to-github) and share the link.

---

<div class="post-metadata">

**Author:** ![z4nsh1n](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/z4nsh1n/32/8913_2.png) [@z4nsh1n](https://forum.codecrafters.io/u/z4nsh1n)\
**Post date:** [April 9, 2025, 7:48pm UTC](https://forum.codecrafters.io/t/ol4-test-fails-although-the-output-seems-correct/8510/4 "2025-04-09T19:48:28Z")

</div>

Hello andy1li,

I’ve created this repository:

> **[GitHub - z4nsh1n/codecrafters-interpreter-zig: An interpreter in Zig](https://github.com/z4nsh1n/codecrafters-interpreter-zig)**
>
> An interpreter in Zig

Hope you can help solve this problem.

---

<div class="post-metadata">

**Author:** ![z4nsh1n](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/z4nsh1n/32/8913_2.png) [@z4nsh1n](https://forum.codecrafters.io/u/z4nsh1n)\
**Post date:** [April 9, 2025, 7:58pm UTC](https://forum.codecrafters.io/t/ol4-test-fails-although-the-output-seems-correct/8510/6 "2025-04-09T19:58:38Z")

</div>

Hey @andy1li,

I’ve fixed it. It dit output EOF null, but for the wrong reasons 😄 . anyway thanks for the offer.

---

<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 20, 2025, 9:03am UTC](https://forum.codecrafters.io/t/ol4-test-fails-although-the-output-seems-correct/8510/8 "2025-04-20T09:03:57Z")

</div>

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