サンプルコード

#!/usr/bin/env bats

@test "addition using bc" {
  result="$(echo 2+2 | bc)"
  [ "$result" -eq 4 ]
}

@test "addition using dc" {
  result="$(echo 2 2+p | dc)"
  [ "$result" -eq 4 ]
}

bats でテストを書いたPR

ci: Setup test with BATS by toshimaru · Pull Request #2 · toshimaru/gh-workflow-log-cleaner

参考資料