@jm6271@sandipndev 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.
test runner: note that right after the assertion you see it does correctly print $ invalid_pear_command
[tester::#RH7] Running tests for Stage #RH7 (History - Up-arrow navigation)
[tester::#RH7] Running ./your_program.sh
[your-program] $ echo apple blueberry
[your-program] apple blueberry
[tester::#RH7] ✓ Command executed successfully
[your-program] $ echo apple mango
[your-program] apple mango
[tester::#RH7] ✓ Command executed successfully
[your-program] $ invalid_pear_command
[your-program] invalid_pear_command: command not found
[tester::#RH7] ✓ Received command not found message
[your-program] $ echo mango strawberry
[your-program] mango strawberry
[tester::#RH7] ✓ Command executed successfully
[tester::#RH7] Pressed "<UP ARROW>" (expecting to recall "echo mango strawberry")
[tester::#RH7] ✓ Prompt line matches "echo mango strawberry"
[tester::#RH7] Pressed "<UP ARROW>" (expecting to recall "invalid_pear_command")
[your-program] $ echo mango strawberry
[tester::#RH7] ^ Line does not match expected value.
[tester::#RH7] Expected: "$ invalid_pear_command"
[tester::#RH7] Received: "$ echo mango strawberry"
[your-program] $ invalid_pear_command
[tester::#RH7] Assertion failed.
[tester::#RH7] Test failed
running locally:
╰─⠠⠵ ./your_program.sh
$ echo apple blueberry
apple blueberry
$ echo apple mango
apple mango
$ invalid_pear_command
invalid_pear_command: command not found
$ echo mango strawberry
mango strawberry
$ echo mango strawberry # NB: i had pressed 'UP' here
$ invalid_pear_command # NB: i had pressed 'UP' here
$ echo apple mango # NB: i had pressed 'UP' here
i’m not using readline and am hand-rolling the functionality with ANSI escape sequences. Its not clear what the exact input the test runner is sending which makes it difficult to repro/debug, especially considering i can’t add any debug logs as it immediately fails the test runner before getting to the interesting part that’s failing with the up arrow