Skip to content

Commit 1882c5c

Browse files
Add test for usage information
1 parent 161ef15 commit 1882c5c

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

test/run_tests.bash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
SOFOS="${1:-../sofos}"
44

5+
bash test-00.bash "${SOFOS}" || exit 1
6+
57
bash test-01.bash "${SOFOS}" || exit 1
68

79
bash test-02.bash "${SOFOS}" || exit 1

test/test-00.bash

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
echo "Running Integration Test: usage ..."
4+
5+
SOFOS="${1:-../sofos}"
6+
7+
"${SOFOS}" -h | grep -q '^Usage:'
8+
9+
if [[ $? -ne 0 ]]; then
10+
echo " ERROR: No usage information found on -h."
11+
exit 1
12+
fi
13+
14+
"${SOFOS}" -? 2>&1 >/dev/null | grep -q '^Usage:'
15+
16+
if [[ $? -ne 0 ]]; then
17+
echo " ERROR: No usage information found on flag error."
18+
exit 1
19+
fi

0 commit comments

Comments
 (0)