Shell challenge,clarification in test case of #UN3 Append STDERR, tester is not expecting content in file mentioned as target for stderr appending for a command which gives error

I was executing tests today while working on Dual command pipeline implementation. For the test case and response,

[your-program] $ ls -1 nonexistent 2>> /tmp/qux/baz.md
[your-program] $ cat /tmp/qux/baz.md
[tester::#UN3] Expected /tmp/qux/bar.md to contain "" but received "ls: nonexistent: No such file or directory\n" 

I am confused as to why is the file expected to be empty? Even though the command specifically mentions the file to be used as stderr append destination, and the command will give the so mentioned error because nonexistent file does not exist. Is this test case actually correct? If so please mention and explain how the response of this test is valid, and if required I will post my code for finding out mistakes.

Hey @RishabhSahuIIIT, the tester expects the previous file to stay empty:

Let me know if you’d like further clarification!

Thanks for the clarification , I was able to resolve it now.

1 Like

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