In this diff the tests which verify version printing functionality are refactored.
Since they are not specific to a particular format we move them into tool-version.test
and slightly unify (similarly to tool-name.test and tool-help-message.test).
Test plan:
make check-all
I think this is an important aspect of this test - see https://github.com/llvm/llvm-project/commit/e9af7158200643dd3ff0feb062fecd564345366c. It might make sense to add a similar check for objcopy. I kind of hinted at that in the original review, but it never got acted on.