As suggested in the challenge, I am using an external library to handle in-line editing and completions. However, the problem is that even the most basic test (from the challenge stage #008, “Print a Prompt” has started failing with the error Expected prompt ("$ ") but received “”.
The problem is that everything works perfectly when I test it on my terminal.
Here’s the relevant code:
static void Main()
{
ReadLine.AutoCompletionHandler = new AutoCompletionHandler();
while (true)
{
string? userCommand = ReadLine.Read(prompt: "$ ")?.Trim()!;
if (string.IsNullOrWhiteSpace(userCommand))
continue;
ICommand command = CommandBuilder.Create(userCommand);
command.Handle();
}
}
Here are the tester logs:
[tester::#OO8] Running tests for Stage #OO8 (Print a prompt)
[tester::#OO8] Running ./your_program.sh
[tester::#OO8] Expected prompt ("$ ") but received ""
[tester::#OO8] Assertion failed.
[tester::#OO8] Test failed
And this is what I get when performing this test on my terminal:
Anyone has any idea what is happening here?
