From 65660cc3cd1fc34863f16a55f7e36f56b248b8f9 Mon Sep 17 00:00:00 2001 From: LukasWillin Date: Thu, 15 Jun 2023 17:16:36 +0200 Subject: [PATCH] (Issue #4) Add new parameters test for -i | --ignore-line-prefix --- tests/functional/parameters.test.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/functional/parameters.test.sh b/tests/functional/parameters.test.sh index e1036bb..9f67f62 100644 --- a/tests/functional/parameters.test.sh +++ b/tests/functional/parameters.test.sh @@ -49,6 +49,26 @@ Context "Parameter testing:" End End + Describe "should have ignore option..." + Parameters + "Short" "-i" + "Long" "--ignore-line-prefix" + End + + Example "$1 ($2)" + Set 'errexit:on' + + + When call "${LIBRARY_PATH}" $2 + The status should be success + + # Here i use a custom matcher function because the text has ANSI colors by default, + # and this makes impossible to the `eq` matcher to find text. + The output should satisfy match_colored_text "OPTIONS:" + The output should satisfy match_colored_text "USAGE:" + End + End + Describe "should SUCCEED when passed the right arguments:" long_input_text="$( %text