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.