Commit Graph

6 Commits

Author SHA1 Message Date
Simon McVittie
2f22e5b359 test-help.sh: Skip trivial-httpd if enabled
Because it runs a binary in ${libexecdir}, it will only work if
libostree was already installed, which makes the build-time test fail.
It also doesn't produce the output we expect: its usage mechanism
mentions "ostree-trivial-httpd", not "ostree trivial-httpd".

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1177
Approved by: jlebon
2017-09-15 19:28:25 +00:00
Jonathan Lebon
077de8ea46 tests/test-help.sh: Rework and strengthen checks
The `sed` expression wasn't actually matching the main output, so we
weren't recursing into the subcommands. Update the syntax to match the
current output and add a check so we don't miss that happening again.

Add a check that the help output is only printed once in all
circumstances. Also add a check for proper handling of non-existent
commands.

Closes: #1126
Approved by: cgwalters
2017-09-13 14:32:20 +00:00
Colin Walters
5ebe43859d tests: Use "bash strict mode"
I noticed in the static deltas tests, there were some tests that
should have been under `-o pipefail` to ensure we properly propagate
errors.

There were a few places where we were referencing undefined variables.

Overall, this is clearly a good idea IMO.
2016-01-27 11:44:10 -05:00
Giuseppe Scrivano
10642cd732 Replace "==" with "=" in shell script test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-01-30 15:27:36 +01:00
Giuseppe Scrivano
22a82341b1 tests: fix --help test
Check for "Usage" only in the root command, builtins may not output
it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-10-21 16:18:30 -04:00
Owen W. Taylor
7fce7e0338 Add test for the behavior of --help
Recursive over ostree and all subcommands, and check that --help
is supported, properly outputs to standard out, and exits
with a 0 exit status. Check that for commands with subcommands,
they produce the help output to standard error when run with no arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=737194
2014-09-25 14:28:58 -04:00