Fix incorrect handling of unrecognized commands.

Fixes #13.
This commit is contained in:
Arzhan Kinzhalin
2018-02-27 15:49:24 -08:00
parent 36438761f8
commit 767d2344ae
2 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -809,7 +809,7 @@ while [ $# -gt 0 ]; do
shift
continue
;;
("generate"|"list"|"add"|"remove"|"restore"|"check")
(*)
COMMAND=$1
shift
;;
+20
View File
@@ -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