Skip to content

Commit 4b9aa14

Browse files
authored
luhn: bring tests up to date (#425)
1 parent 537d6e3 commit 4b9aa14

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

exercises/luhn/.meta/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.1
1+
1.7.0

exercises/luhn/luhn_test.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# local version: 1.6.1.0
3+
# local version: 1.7.0.0
44

55
@test "single digit strings can not be valid" {
66
#[[ $BATS_RUN_SKIPPED == true ]] || skip
@@ -51,6 +51,13 @@
5151
[[ $output == "false" ]]
5252
}
5353

54+
@test "invalid long number with an even remainder" {
55+
[[ $BATS_RUN_SKIPPED == true ]] || skip
56+
run bash luhn.sh "1 2345 6789 1234 5678 9012"
57+
[[ $status -eq 0 ]]
58+
[[ $output == "false" ]]
59+
}
60+
5461
@test "valid number with an even number of digits" {
5562
[[ $BATS_RUN_SKIPPED == true ]] || skip
5663
run bash luhn.sh "095 245 88"

0 commit comments

Comments
 (0)