11#! /usr/bin/env bats
22load bats-extra
33
4- # local version: 1.1.0.0
5-
6- # "Perfect numbers"
4+ # generated on 2026-06-29T05:05:58+00:00
5+ # local version: 2.0.0.0
76
87@test " Smallest perfect number is classified correctly" {
9- # [[ $BATS_RUN_SKIPPED == "true" ]] || skip
8+ # [[ $BATS_RUN_SKIPPED == "true" ]] || skip
109 run bash perfect_numbers.sh 6
1110 assert_success
1211 assert_output " perfect"
@@ -26,8 +25,6 @@ load bats-extra
2625 assert_output " perfect"
2726}
2827
29- # "Abundant numbers"
30-
3128@test " Smallest abundant number is classified correctly" {
3229 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
3330 run bash perfect_numbers.sh 12
@@ -56,8 +53,6 @@ load bats-extra
5653 assert_output " abundant"
5754}
5855
59- # "Deficient numbers"
60-
6156@test " Smallest prime deficient number is classified correctly" {
6257 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
6358 run bash perfect_numbers.sh 2
@@ -93,18 +88,16 @@ load bats-extra
9388 assert_output " deficient"
9489}
9590
96- # "Invalid inputs"
97-
98- @test " Zero is rejected (not a natural number)" {
91+ @test " Zero is rejected (as it is not a positive integer)" {
9992 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
10093 run bash perfect_numbers.sh 0
10194 assert_failure
102- assert_output " Classification is only possible for natural numbers ."
95+ assert_output " Classification is only possible for positive integers ."
10396}
10497
105- @test " Negative integer is rejected (not a natural number )" {
98+ @test " Negative integer is rejected (as it is not a positive integer )" {
10699 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
107100 run bash perfect_numbers.sh -1
108101 assert_failure
109- assert_output " Classification is only possible for natural numbers ."
102+ assert_output " Classification is only possible for positive integers ."
110103}
0 commit comments