I don’t understand why I’m getting this error, I passed this testcase previously, so why does this one show error now, it’s not like I’ve added a code that directly affects this particular part.
Can someone please help me understand why am I getting this error in the first place
[tester::#UN3] Running tests for Stage #UN3 (Redirection - Append stderr)
[tester::#UN3] [setup] export PATH=/tmp/strawberry/apple/blueberry:$PATH
[tester::#UN3] Running ./your_program.sh
[your-program] $ ls -1 nonexistent >> /tmp/quz/bar.md
[tester::#UN3] Failed to read file ("/tmp/quz/bar.md"): open /tmp/quz/bar.md: no such file or directory
[your-program] ls: nonexistent: No such file or directory
[your-program] $
[tester::#UN3] Assertion failed.
[tester::#UN3] Test failed
I didn’t notice this before, but if the check is for Redirection - Append stderr,
then why is it using “>>” not “2>>”, stderr is “2>>” not the normal “>>”
Sorry, I’m still kinda confused. I’m using c# if that was not clear, so the error happens directly after reading the line like: var line = Console.ReadLine(); Console.WriteLine("My debug outpuit");
And this is the debug output: [your-program] $ ls -1 nonexistent >> /tmp/quz/bar.md [tester::#UN3] Failed to read file ("/tmp/quz/bar.md"): open /tmp/quz/bar.md: no such file or directory [your-program] My debug output
I guess I’m not reading the logs correctly and understanding the assignment. If tester::#UN3 throws an error here before I can even do anything in my code (because the error is between my readline and debug output) then by my reasoning I cannot correct this, I’m not even the one throwing an error!
Ok, but if you look at my code (these lines are one after the other in my code) and compare to the logs when pushing to git you see that the “fail to read file…” line is before the “My debug output” line so from that I concluded that the check if the file exists comes from somewhere else and comes too soon for me to handle. I will modify the code now so that it creates the file regardless if there is any output to it.
Also if I’m not mistaken the check if file exists was done in earlier steps with the cat command?