You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
linux-infosec-setupper/test_common.sh

22 lines
500 B
Bash

#!/bin/bash
#set -x
TESTING=1
. ./common.sh
! _check_argument_is_number 123 "this" && failed="$((++failed))"
_check_argument_is_number NotNumber "this" && failed="$((++failed))"
! _check_argument_value 8 7 "this" && failed="$((++failed))"
_check_argument_value 1 7 "this" && failed="$((++failed))"
! _check_argument_is_string "Hello" "this" && failed="$((++failed))"
_check_argument_is_string "Hello world" "this" && failed="$((++failed))"
failed="${failed:-0}"
echo "$failed"
exit "$failed"