The testing in merged.test is not ideal.
It uses the following set of flags: -aeWhSrnudlVgIs
and the precompiled object trivial.obj.elf-i386.
In fact, this object, for example, does not contain versioning stuff,
so specifying -V does not make much sense for it, so it is not really tested.
Also, we want to avoid using precompiled objects, ideally we want to use a YAML that
triggers any output for each of the short options in use:
-a: --all -e: --headers -W: --wide -h: --file-headers, --file-header -S: --section-headers, --sections -r: --relocations -n: --notes -u: --unwind -d: --dynamic-table -l: --program-headers -V: --version-info -g: --elf-section-groups -I: --elf-hash-histogram -s: --symbols
Note that, for example, we do not need to have groups to test -g, because for a
object with no groups llvm-readelf still prints "There are no section groups in this file.",
but that is not always the case. E.g. for -d we don't print anything when we have
no dynamic table, so we have to describe it in a YAML to test -d properly.
Also, we probably want to test cases with and without -a(-all) option separatelly
to be sure that we handle all options and not only the first one in the sequence.
(or, perhaps, we could move -a from the first place to somewhere in the middle,
though testing it separatelly looks a bit safer to me probably).
We probably want similar testing for -e, since that is the same as specifying -hlS, I believe.