diff options
Diffstat (limited to 'test/unit/_parse_usage.exp')
-rw-r--r-- | test/unit/_parse_usage.exp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/_parse_usage.exp b/test/unit/_parse_usage.exp index 0069848d..5a40b1fe 100644 --- a/test/unit/_parse_usage.exp +++ b/test/unit/_parse_usage.exp @@ -5,6 +5,7 @@ proc setup {} { proc teardown {} { assert_env_unmodified { /declare -f fn/d + /PIPESTATUS=/d } } @@ -55,5 +56,9 @@ set cmd {fn() { printf '%s\n' "----\n---foo\n----- bar"; }; _parse_usage fn} assert_bash_list "" $cmd "many dashes" sync_after_int +set cmd { printf '%s\n' "[-duh]" | _parse_usage - } +assert_bash_list "-d -u -h" $cmd "from stdin" +sync_after_int + teardown |