@@ -25,78 +25,88 @@ test isbn-4 "check digit is a character other than X" -body {
2525 isValid " 3-598-21507-A"
2626} -returnCodes ok -match boolean -result false
2727
28- skip isbn-xyz
29- test isbn-xyz " invalid check digit in isbn is not treated as zero" -body {
28+ skip isbn-5
29+ test isbn-5 " invalid check digit in isbn is not treated as zero" -body {
3030 isValid " 4-598-21507-B"
3131} -returnCodes ok -match boolean -result false
3232
33- skip isbn-5
34- test isbn-5 " invalid character in isbn" -body {
33+ skip isbn-6
34+ test isbn-6 " invalid character in isbn" -body {
3535 isValid " 3-598-P1581-X"
3636} -returnCodes ok -match boolean -result false
3737
38- skip isbn-6
39- test isbn-6 " X is only valid as a check digit" -body {
38+ skip isbn-7
39+ test isbn-7 " X is only valid as a check digit" -body {
4040 isValid " 3-598-2X507-9"
4141} -returnCodes ok -match boolean -result false
4242
43- skip isbn-7
44- test isbn-7 " valid isbn without separating dashes" -body {
43+ skip isbn-8
44+ test isbn-8 " X is not substituted by the value 10" -body {
45+ isValid " 3-598-2X507-5"
46+ } -returnCodes ok -match boolean -result false
47+
48+ skip isbn-9
49+ test isbn-9 " only one check digit is allowed" -body {
50+ isValid " 3-598-21508-96"
51+ } -returnCodes ok -match boolean -result false
52+
53+ skip isbn-10
54+ test isbn-10 " valid isbn without separating dashes" -body {
4555 isValid " 3598215088"
4656} -returnCodes ok -match boolean -result true
4757
48- skip isbn-8
49- test isbn-8 " isbn without separating dashes and X as check digit" -body {
58+ skip isbn-11
59+ test isbn-11 " isbn without separating dashes and X as check digit" -body {
5060 isValid " 359821507X"
5161} -returnCodes ok -match boolean -result true
5262
53- skip isbn-9
54- test isbn-9 " isbn without check digit and dashes" -body {
63+ skip isbn-12
64+ test isbn-12 " isbn without check digit and dashes" -body {
5565 isValid " 359821507"
5666} -returnCodes ok -match boolean -result false
5767
58- skip isbn-10
59- test isbn-10 " too long isbn and no dashes" -body {
68+ skip isbn-13
69+ test isbn-13 " too long isbn and no dashes" -body {
6070 isValid " 3598215078X"
6171} -returnCodes ok -match boolean -result false
6272
63- skip isbn-11
64- test isbn-11 " too short isbn" -body {
73+ skip isbn-14
74+ test isbn-14 " too short isbn" -body {
6575 isValid " 00"
6676} -returnCodes ok -match boolean -result false
6777
68- skip isbn-12
69- test isbn-12 " isbn without check digit" -body {
78+ skip isbn-15
79+ test isbn-15 " isbn without check digit" -body {
7080 isValid " 3-598-21507"
7181} -returnCodes ok -match boolean -result false
7282
73- skip isbn-13
74- test isbn-13 " check digit of X should not be used for 0" -body {
83+ skip isbn-16
84+ test isbn-16 " check digit of X should not be used for 0" -body {
7585 isValid " 3-598-21515-X"
7686} -returnCodes ok -match boolean -result false
7787
78- skip isbn-14
79- test isbn-14 " empty isbn" -body {
88+ skip isbn-17
89+ test isbn-17 " empty isbn" -body {
8090 isValid " "
8191} -returnCodes ok -match boolean -result false
8292
83- skip isbn-15
84- test isbn-15 " input is 9 characters" -body {
93+ skip isbn-18
94+ test isbn-18 " input is 9 characters" -body {
8595 isValid " 134456729"
8696} -returnCodes ok -match boolean -result false
8797
88- skip isbn-16
89- test isbn-16 " invalid characters are not ignored" -body {
98+ skip isbn-19
99+ test isbn-19 " invalid characters are not ignored" -body {
90100 isValid " 3132P34035"
91101} -returnCodes ok -match boolean -result false
92102
93- skip isbn-17
94- test isbn-17 " invalid characters are not ignored before checking length" -body {
103+ skip isbn-20
104+ test isbn-20 " invalid characters are not ignored before checking length" -body {
95105 isValid " 3598P215088"
96106} -returnCodes ok -match boolean -result false
97107
98- skip isbn-18
99- test isbn-18 " input is too long but contains a valid isbn" -body {
108+ skip isbn-21
109+ test isbn-21 " input is too long but contains a valid isbn" -body {
100110 isValid " 98245726788"
101111} -returnCodes ok -match boolean -result false
102112
0 commit comments