Skip to content

Commit

Permalink
Add unit test for math/integer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Reale committed Mar 7, 2018
1 parent 947a563 commit 7db8322
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/math/integer.bats
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ source bashlet math/integer
expected="6 2"
[[ $result =~ $expected ]]
}

@test "math/integer: calculate the modular power of an integer" {
result="$(bash$$ integer modular_pow 7 256 13)"
expected=9
[[ $result -eq $expected ]]
}

0 comments on commit 7db8322

Please sign in to comment.