Skip to content
Snippets Groups Projects
Commit 4eeb7bcb authored by Eduardo Klosowski's avatar Eduardo Klosowski
Browse files

Adicionado funções para fazer e exibir os testes

parent 22822a9a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Lib
print_title() {
tput bold
echo -n "$1: "
tput sgr0
}
print_success() {
tput setaf 2
echo 'OK'
tput sgr0
}
print_error() {
tput setaf 1
echo 'ERR'
tput sgr0
}
run_step() {
print_title "$1"
if output="$(bash -c "$2" 2>&1)"; then
print_success
return 0
fi
print_error
echo "$output" | sed -r 's/(.*)/ \1/'
return 1
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment