tests verbosity et interaction
This commit is contained in:
parent
8e3569ac4b
commit
01c65a6e6a
29
bash/tests/test-interaction.sh
Executable file
29
bash/tests/test-interaction.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
source "$(dirname -- "$0")/../src/nulib.sh" || exit 1
|
||||||
|
#NULIB_NO_DISABLE_SET_X=1
|
||||||
|
|
||||||
|
args=(
|
||||||
|
"tester diverses fonctions de saisie"
|
||||||
|
)
|
||||||
|
parse_args "$@"; set -- "${args[@]}"
|
||||||
|
|
||||||
|
estep "inter non auto non"
|
||||||
|
ask_yesno "oui ou non?" && echo oui || echo non
|
||||||
|
estep "inter oui auto oui"
|
||||||
|
ask_yesno "oui ou non?" O && echo oui || echo non
|
||||||
|
estep "inter non auto non"
|
||||||
|
ask_yesno "oui ou non?" N && echo oui || echo non
|
||||||
|
estep "inter non auto oui"
|
||||||
|
ask_yesno "oui ou non?" C && echo oui || echo non
|
||||||
|
estep "inter oui auto non"
|
||||||
|
ask_yesno "oui ou non?" X && echo oui || echo non
|
||||||
|
|
||||||
|
estep "valeur par défaut vide"
|
||||||
|
read_value "valeur" empty "" N; echo "valeur=$empty"
|
||||||
|
|
||||||
|
estep "valeur par défaut non vide"
|
||||||
|
read_value "valeur" default default N; echo "valeur=$default"
|
||||||
|
|
||||||
|
estep "valeur requise"
|
||||||
|
read_value "valeur" required; echo "valeur=$required"
|
24
bash/tests/test-verbosity.sh
Executable file
24
bash/tests/test-verbosity.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
source "$(dirname -- "$0")/../src/nulib.sh" || exit 1
|
||||||
|
#NULIB_NO_DISABLE_SET_X=1
|
||||||
|
|
||||||
|
args=(
|
||||||
|
"afficher divers messages avec les fonctions e*"
|
||||||
|
)
|
||||||
|
parse_args "$@"; set -- "${args[@]}"
|
||||||
|
|
||||||
|
eimportant "important (q)"
|
||||||
|
eattention "attention (q)"
|
||||||
|
eerror "error (q)"
|
||||||
|
ewarn "warn (q)"
|
||||||
|
enote "note (qv)"
|
||||||
|
einfo "info (qv)"
|
||||||
|
eecho "echo (qv)"
|
||||||
|
edebug "debug (D)"
|
||||||
|
|
||||||
|
estep "step (qv)"
|
||||||
|
estepe "stepe (qv)"
|
||||||
|
estepw "stepw (qv)"
|
||||||
|
estepn "stepn (qv)"
|
||||||
|
estepi "stepi (qv)"
|
Loading…
Reference in New Issue
Block a user