File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ bash_unit filter =insert_tag
Original file line number Diff line number Diff line change 1616#
1717# https://github.com/pgrange/bash_unit
1818
19+ VERSION=snapshot
20+
1921ESCAPE=$( printf " \033" )
2022NOCOLOR=" ${ESCAPE} [0m"
2123RED=" ${ESCAPE} [91m"
@@ -152,10 +154,11 @@ run_test() {
152154
153155usage () {
154156 echo " $1 " >&2
155- echo " $0 [-f <output format< ] [-p <pattern1>] [-p <pattern2>]... <test_file1> <test_file2>..." >&2
157+ echo " $0 [-f <output format> ] [-p <pattern1>] [-p <pattern2>]... <test_file1> <test_file2>..." >&2
156158 echo >&2
157159 echo " Runs tests in test files that match <pattern>s" >&2
158160 echo " <output format> is optionnal only supported value is tap" >&2
161+ echo " -v to get current version information" >&2
159162 echo " See https://github.com/pgrange/bash_unit" >&2
160163 exit 1
161164}
@@ -263,7 +266,7 @@ tap_format() {
263266output_format=text
264267test_pattern=" "
265268separator=" "
266- while getopts " p :f:" option
269+ while getopts " vp :f:" option
267270do
268271 case " $option " in
269272 p)
273276 f)
274277 output_format=" ${OPTARG} "
275278 ;;
279+ v)
280+ echo " bash_unit $VERSION "
281+ exit
282+ ;;
276283 ? |:)
277284 usage
278285 ;;
You can’t perform that action at this time.
0 commit comments