Match alphanumeric characters #mr9: bash $ expansion causes failed tests

A specific test on stage #MR9 fails because the characters $- are expanded to “Builtin Set Flags” on bash.

remote: [tester::#MR9] $ echo -n "×€÷_$-×" | ./your_program.sh -E "\w"
remote: [tester::#MR9] Expected exit code 0, got 1
remote: [tester::#MR9] Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

I believe the tests should use single quotes to avoid $ expansions. Using echo -n '×€÷_$-×' on my own machine worked, but echo -n "×€÷_$-×" was expanded to ×€÷_himBHs× and failed the test.

Hey @danilogalisteu, thanks for highlighting the issue!

We’ve removed $ from the testcase in this PR. Let me know if you’re stilling running into issues!

1 Like

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