Skip to content

Commit f5e8c2d

Browse files
committed
Merge branch 'rpottsoh/updateLuhn' (#348)
2 parents 10bffe4 + dfbe123 commit f5e8c2d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

exercises/luhn/uLuhnTest.pas

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface
55
DUnitX.TestFramework;
66

77
const
8-
CanonicalVersion = '1.3.0';
8+
CanonicalVersion = '1.4.0';
99

1010
type
1111

@@ -48,6 +48,10 @@ TLuhnTest = class(TObject)
4848
[Ignore]
4949
procedure valid_strings_with_a_non_digit_included_become_invalid;
5050

51+
[Test]
52+
[Ignore]
53+
procedure valid_strings_with_a_non_digit_added_at_the_end_become_invalid;
54+
5155
[Test]
5256
[Ignore]
5357
procedure valid_strings_with_punctuation_included_become_invalid;
@@ -138,6 +142,11 @@ procedure TLuhnTest.valid_number_with_an_even_number_of_digits;
138142
Assert.AreEqual(true, TLuhn.Valid('095 245 88'));
139143
end;
140144

145+
procedure TLuhnTest.valid_strings_with_a_non_digit_added_at_the_end_become_invalid;
146+
begin
147+
Assert.AreEqual(false, TLuhn.Valid('059a'));
148+
end;
149+
141150
procedure TLuhnTest.valid_strings_with_a_non_digit_included_become_invalid;
142151
begin
143152
Assert.AreEqual(false, TLuhn.Valid('055a 444 285'));

0 commit comments

Comments
 (0)