0
0
mirror of https://github.com/thegeeklab/retry.git synced 2024-10-30 03:00:39 +00:00
retry/retry.bats

15 lines
266 B
Plaintext
Raw Permalink Normal View History

2022-11-02 20:34:28 +00:00
#!/usr/bin/env bats
@test "retry echo should work" {
2022-11-02 20:58:50 +00:00
run ./retry 'echo "u work good"'
2022-11-02 20:34:28 +00:00
[ "$output" = "u work good" ]
}
@test "retry false should fail" {
run ./retry -t 1 'echo "y u no work"; false'
[ "$status" -ne 0 ]
2022-11-02 20:58:50 +00:00
[[ "$output" =~ "y u no work" ]]
2022-11-02 20:34:28 +00:00
}