Discovered while running “Run a program stage”.
The test runners’ type cat is getting failed, when I run the same on my machine it’s always generating expected output as below:
I’m using yours git repo: [censored ]
I tried all my debug avenues but availed no success, any help in this regard is appreciated
Regards
~Hamed
andy1li
December 17, 2024, 3:21am
3
Hi @rite2hamed , I can barely read Zig.
The code currently fails at stage #MG5 , but it successfully passed earlier. Could you check out the last successful version and compare what might have gone wrong?
git checkout bdd10f3e33c01d7524b50c215bdd91090927a2d2
I refactored my code, does your test harness needs an elevated permissions, it doesn’t seem to find /bin/cat (from my screen shot)
On my machine it’s printing as expected cat is /bin/cat (from my screen shot)
andy1li
December 21, 2024, 9:02pm
7
does your test harness needs an elevated permissions,
In short, no.
It’s likely that your refactor introduced an unintended bug, as the previous commit (bdd10f3e33c01d7524b50c215bdd91090927a2d2
) passed successfully.
In fact, the refactor is actually no longer passing the second stage #CZ2 (Handle invalid commands) .
Suggestions:
Use our CLI to test against previous stages by running:
codecrafters test --previous
Focus on fixing the early stages first, as later stages depend on them.
1 Like
system
Closed
December 26, 2024, 9:56pm
9
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.