If you run git2cpp -v or git2cpp --version you get the version information as requested but also the help information, so we need to avoid displaying the help information if the version flag is set, probably here:
|
if (app.get_subcommands().size() == 0) |
We could modify the test_version to assert that only one line is written to stdout, perhaps using something like p.stdout.count(b('\n')).
If you run
git2cpp -vorgit2cpp --versionyou get the version information as requested but also the help information, so we need to avoid displaying the help information if the version flag is set, probably here:git2cpp/src/main.cpp
Line 42 in dbd11b0
We could modify the
test_versionto assert that only one line is written tostdout, perhaps using something likep.stdout.count(b('\n')).