Added read_sleep

This commit is contained in:
Dylan Araps
2018-06-15 17:24:12 +10:00
parent 0185f6dcab
commit c181b0afa9
2 changed files with 30 additions and 0 deletions

View File

@@ -121,6 +121,12 @@ test_date() {
assert_equals "$result" "20"
}
test_read_sleep() {
result="$SECONDS"
read_sleep 1
assert_equals "$((result+1))" "$SECONDS"
}
assert_equals() {
if [[ "$1" == "$2" ]]; then
((pass+=1))