[llvm-mc] Better error handling in ENOENT case + test.
This is a follow up to r247518.
As a general note, I think we could do a much better job testing for
error conditions in tools. I already anticipated in a previous mail,
but while implementing this I noticed that the code coverage we have
for error checking is pretty low. I can arbitrarily remove checks from
several tools and the suite still passes.
Differential Revision: http://reviews.llvm.org/D12846
llvm-svn: 247582
diff --git a/llvm/test/tools/llvm-mc/basic.test b/llvm/test/tools/llvm-mc/basic.test
new file mode 100644
index 0000000..69d8f31
--- /dev/null
+++ b/llvm/test/tools/llvm-mc/basic.test
@@ -0,0 +1,2 @@
+# RUN: not llvm-mc %t.blah -o %t2 2>&1 | FileCheck --check-prefix=ENOENT %s
+# ENOENT: {{.*}}.blah: {{[Nn]}}o such file or directory