-
Notifications
You must be signed in to change notification settings - Fork 5
The error messages should be more descriptive now #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Arpan-206
merged 8 commits into
main
from
arpan/cc-1667-fix-incorrect-shell-tester-message-for-stage-pn5
Apr 30, 2025
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2b2804c
Added test and rewrote the whole thing basically
Arpan-206 c48b05a
Fix the fixtures + move the loggin inside temporarily
Arpan-206 269dc90
Move logging outside
Arpan-206 6bf6e17
Merge branch 'main' into arpan/cc-1667-fix-incorrect-shell-tester-mes…
Arpan-206 1eb88c1
I caan't believe this is what fixed it, and I missed it
Arpan-206 ec2bb56
troubleshoot prints
Arpan-206 5892035
Actualy fix the thing + update lodRows to make it inclusive
Arpan-206 509220b
Fixtures Update
Arpan-206 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| Debug = true | ||
|
|
||
| [33m[stage-4] [0m[94mRunning tests for Stage #4: pn5[0m | ||
| [33m[stage-4] [0m[94mRunning ./your_shell.sh[0m | ||
| [33m[your-program] [0m$ invalid_apple_command | ||
| [33m[your-program] [0minvalid_apple_command: command not found | ||
| [33m[stage-4] [0m[92m✓ Received command not found message[0m | ||
| [33m[your-program] [0m$ exit 0 | ||
| [33m[your-program] [0mexit: command not found | ||
| [33m[your-program] [0m$ | ||
| [33m[stage-4] [0m[91mExpected program to exit with 0 exit code, program is still running.[0m | ||
| [33m[stage-4] [0m[91mTest failed[0m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Set this to true if you want debug logs. | ||
| # | ||
| # These can be VERY verbose, so we suggest turning them off | ||
| # unless you really need them. | ||
| debug: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import sys | ||
|
|
||
|
|
||
| def main(): | ||
| while True: | ||
| sys.stdout.write("$ ") | ||
| sys.stdout.flush() | ||
|
|
||
| command = input().strip() | ||
| parts = command.split(" ") | ||
| cmd = parts[0] | ||
| args = parts[1:] | ||
|
|
||
| if cmd == "exitt": | ||
| sys.exit(0) | ||
| else: | ||
| sys.stdout.write(f"{cmd}: command not found\n") | ||
| sys.stdout.flush() | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/sh | ||
| # | ||
| # DON'T EDIT THIS! | ||
| # | ||
| # CodeCrafters uses this file to test your code. Don't make any changes here! | ||
| # | ||
| # DON'T EDIT THIS! | ||
| exec python3 $(dirname "$0")/main.py "$@" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Arpan-206 thought we talked about this - we should be logging this no matter what, not only when a specific error type is found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thought I changed it back, lemme do that!