Skip to content

Commit 0e38ee8

Browse files
author
Damien Nadé
committed
unittest: added test case for option_foo_values
1 parent b371edb commit 0e38ee8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

unittest

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,15 @@ cumul_test() {
301301
parse_option_wrapper "multiple require (4)" --option3 --option2 --option1
302302
)
303303

304+
305+
(
306+
declare -a option_option1_values=(accept)
307+
argsparse_use_option option1: ""
308+
TEST=failure parse_option_wrapper "accepted values (bad value)" \
309+
--option1 foo
310+
parse_option_wrapper "accepted values (good value)" --option1 accept
311+
)
312+
304313
dir=$(mktemp -d)
305314
file=$(mktemp --tmpdir="$dir")
306315
declare -A types=(

0 commit comments

Comments
 (0)