Raindrops - test failures

Hello! Why do tests fail?

(( “$1” % 3 == 0 )) && echo -n “Pling”
(( “$1” % 5 == 0 )) && echo -n “Plang”
(( “$1” % 7 == 0 )) && echo -n “Plong”
(( “$1” % 3 != 0 && “$1” % 5 != 0 && “$1” % 7 != 0 )) && echo “$1”

Test Failure

(from function assert_success' in file bats-extra.bash, line 409, in test file raindrops.bats, line 16) assert_success’ failed

– command failed –
status : 1
output : Pling

etc

Your script is expected to “succeed”, ie have an exist status of 0. However, it has an exit status of 1, which is treated as a “command failed”.

What happens here if $1 is divisible by 3?