[test] Use yaml2obj -o %t instead of > %t

To improve consistency and avoid unneeded shell feature (output
redirection).

While here, make other changes to improve consistency

--docnum 1 => --docnum=1
-docnum=x => --docnum=x
diff --git a/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test b/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test
index 932584c..df1a446 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/bad-output-format.test
@@ -1,4 +1,4 @@
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
 
 # RUN: not llvm-objcopy -O xyz %t.o %t.2.o 2>&1 \
 # RUN:   | FileCheck %s --check-prefix=BAD-OUTPUT-FORMAT