I’m stuck on Stage #GP4.
All the tests are passing until first stage #OO8, where the tester seems to timeout before the main function even starts.
It used to work before but is somehow failing now.
Have seen a similar issue here.
Is this a Go version error ?
Here are my logs:
[tester::#NI6] Running tests for Stage #NI6 (Quoting - Single quotes)
[tester::#NI6] [setup] export PATH=/tmp/mango/apple/strawberry:$PATH
[tester::#NI6] Running ./your_shell.sh
[tester::#NI6] [setup] echo -n "raspberry apple." > "/tmp/qux/f 23"
[tester::#NI6] [setup] echo -n "orange raspberry." > "/tmp/qux/f 54"
[tester::#NI6] [setup] echo -n "banana apple." > "/tmp/qux/f 11"
[your-program] $ echo 'example test'
[your-program] example test
[tester::#NI6] ✓ Received expected response
[your-program] $ echo test hello
[your-program] test hello
[tester::#NI6] ✓ Received expected response
[your-program] $ echo 'script world' 'hello''example' test''shell
[your-program] script world helloexample testshell
[tester::#NI6] ✓ Received expected response
[your-program] $ cat '/tmp/qux/f 23' '/tmp/qux/f 54' '/tmp/qux/f 11'
[your-program] raspberry apple.orange raspberry.banana apple.
[tester::#NI6] ✓ Received expected response
[your-program] $
[tester::#NI6] Test passed.
[tester::#GP4] Running tests for Stage #GP4 (Navigation - The cd builtin: Home directory)
[tester::#GP4] Running ./your_shell.sh
[tester::#GP4] Expected prompt ("$ ") but received ""
[tester::#GP4] Assertion failed.
[tester::#GP4] Test failed
And here’s a snippet of main code:
func main() {
for {
fmt.Fprint(os.Stdout, "$ ")
userInput, err := bufio.NewReader(os.Stdin).ReadString('\n')
if err != nil {
fmt.Println("error reading input:", err)
os.Exit(1)
}
cmd, args := parseInput(userInput[:len(userInput)-1])
handleCommand(cmd, args)
}
}