File: cli-err-action-missing-msg.sh

package info (click to toggle)
snoopy 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,988 kB
  • sloc: ansic: 7,167; sh: 4,514; makefile: 1,095
file content (25 lines) | stat: -rwxr-xr-x 417 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash



### Configure shell and bootstrap
#
set -e
set -u
. `dirname $BASH_SOURCE`/_bootstrap.sh



### Test for error(s)
#
EXPECTED_ERROR_MESSAGE="[ERROR] No action specified"
RES=`$SNOOPY_CLI 2>&1 | fgrep -c "$EXPECTED_ERROR_MESSAGE"` || true
if [ "$RES" != "1" ]; then
    snoopy_testResult_fail "Expected error message not encountered: '$EXPECTED_ERROR_MESSAGE'"
fi



### Success
#
snoopy_testResult_pass