prototype

master
Артемий 3 years ago
parent f8f1b02ea9
commit bef97df805

@ -88,9 +88,13 @@ _mk_pwquality_conf() {
shift
;;
--usercheck) shift;
echo 1
_check_argument_is_number "$1" "--usercheck"
echo 2
[[ "$1" =~ (0|1) ]] || error $"The received parameters are not correct. Expected %s, received %s" $"0 or 1" "$1"
echo 3
usercheck="$1"
echo 4
shift
;;
--usersubstr) shift;

@ -6,13 +6,13 @@ TESTING=1
. ./common.sh
_check_argument_is_number 123 "this" || failed="$((++failed))"
! _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 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" "this" && failed="$((++failed))"
_check_argument_is_string "Hello world" "this" && failed="$((++failed))"

Loading…
Cancel
Save