cleanup tests
This commit is contained in:
parent
9ba26572cb
commit
6119fc7b20
10
test.sh
10
test.sh
|
@ -121,20 +121,18 @@ test_date() {
|
|||
}
|
||||
|
||||
assert_equals() {
|
||||
local status
|
||||
((tests+=1))
|
||||
|
||||
[[ "$1" == "$2" ]] && status="✔"
|
||||
printf '%s\n' " ${status:-✖} | ${FUNCNAME[1]/test_}"
|
||||
|
||||
if [[ "$1" == "$2" ]]; then
|
||||
((pass+=1))
|
||||
return 0
|
||||
status=$'\e[32m✔'
|
||||
else
|
||||
:>/tmp/err
|
||||
((err+=1))
|
||||
return 1
|
||||
status=$'\e[31m✖'
|
||||
fi
|
||||
|
||||
printf ' %s\e[m | %s\n' "$status" "${FUNCNAME[1]/test_}"
|
||||
}
|
||||
|
||||
main() {
|
||||
|
|
Loading…
Reference in New Issue