From b2631ce49a512acd009d3f6d3360c5a96d5f88bb Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Fri, 10 Aug 2012 11:49:09 +0200 Subject: [PATCH] Add test for checking that all gnt-* subcommands run OK MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is a bit of a shell munging trickery, but works for now. Making it more generic can be done later. Signed-off-by: Iustin Pop Reviewed-by: René Nussbaumer --- test/gnt-cli.test | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/gnt-cli.test b/test/gnt-cli.test index 1c1f936..8f49481 100644 --- a/test/gnt-cli.test +++ b/test/gnt-cli.test @@ -70,3 +70,8 @@ $SCRIPTS/gnt-debug --version >>>/^gnt-/ >>>2 >>>= 0 + +# test that verifies all sub-commands can be run with --help, checking +# that optparse doesn't reject the options list +set -e; for c in scripts/gnt-*; do for i in $($c --help|grep '^ [^ ]'|awk '{print $1}'); do echo Checking command ${c##/}/$i; $c $i --help >/dev/null; done; done +>>>= 0 -- 1.7.10.4