diff --git a/clrtrust b/clrtrust index 82f333e..bd65860 100755 --- a/clrtrust +++ b/clrtrust @@ -809,7 +809,7 @@ while [ $# -gt 0 ]; do shift continue ;; - ("generate"|"list"|"add"|"remove"|"restore"|"check") + (*) COMMAND=$1 shift ;; diff --git a/test/unrecognized-cmd.bats b/test/unrecognized-cmd.bats new file mode 100755 index 0000000..5d75c18 --- /dev/null +++ b/test/unrecognized-cmd.bats @@ -0,0 +1,20 @@ +#!/usr/bin/env bats +# Copyright 2017 Intel Corporation + +load test_lib + +setup() { + find_clrtrust + setup_fs +} + +@test "handle unrecognized command" { + run $CLRTRUST regenerate + [ $status -ne 0 ] +} + +teardown() { + remove_fs +} + +# vim: ft=sh:sw=4:ts=4:et:tw=80:si:noai:nocin