Add some error messages
This commit is contained in:
parent
99a88d4898
commit
f1054a71ca
1 changed files with 4 additions and 1 deletions
5
test.sh
5
test.sh
|
@ -50,11 +50,14 @@ function usage (){
|
||||||
msg "\t<arguments>**:**<code_retour_attendu>\n\n"
|
msg "\t<arguments>**:**<code_retour_attendu>\n\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo " Hououuuu ${PWD}"
|
msg "**ADSILLH Bash return code test**\n"
|
||||||
process_args $@
|
process_args $@
|
||||||
|
[[ -z $COMMAND || -z $TEST_FILE ]] && error "You must specity a command and a test file"
|
||||||
msg "Test $COMMAND script with $TEST_FILE\n\n"
|
msg "Test $COMMAND script with $TEST_FILE\n\n"
|
||||||
|
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
[ ! -f $COMMAND ] && error "script **$COMMAND** not found"
|
||||||
|
|
||||||
while IFS='' read -r i || [[ -n "$line" ]]; do
|
while IFS='' read -r i || [[ -n "$line" ]]; do
|
||||||
args=$(echo $i | cut -d: -f1)
|
args=$(echo $i | cut -d: -f1)
|
||||||
e_code=$(echo $i | cut -d: -f2)
|
e_code=$(echo $i | cut -d: -f2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue