Jump to content

Template:ISBN/testcases

From Wikipedia, the free encyclopedia

ISBN 10

[edit]

fails

invalid character
{{ISBN|3–123467899}}

{{ISBN}}

ISBN 3–123467899 Parameter error in {{ISBN}}: invalid character

{{ISBN/sandbox}}

ISBN 3–123467899 Parameter error in {{ISBN}}: invalid character

length (too many characters)
{{ISBN|312346789}}

{{ISBN}}

ISBN 312346789 Parameter error in {{ISBN}}: length

{{ISBN/sandbox}}

ISBN 312346789 Parameter error in {{ISBN}}: length

length (too few characters)
{{ISBN|31234678999}}

{{ISBN}}

ISBN 31234678999 Parameter error in {{ISBN}}: length

{{ISBN/sandbox}}

ISBN 31234678999 Parameter error in {{ISBN}}: length

invalid form
{{ISBN|41234678X9}}

{{ISBN}}

ISBN 41234678X9 Parameter error in {{ISBN}}: invalid form

{{ISBN/sandbox}}

ISBN 41234678X9 Parameter error in {{ISBN}}: invalid form

checksum
{{ISBN|3123467896}}

{{ISBN}}

ISBN 3123467896 Parameter error in {{ISBN}}: checksum

{{ISBN/sandbox}}

ISBN 3123467896 Parameter error in {{ISBN}}: checksum

invalid group id
{{ISBN|6300183629}}

{{ISBN}}

ISBN 6300183629 Parameter error in {{ISBN}}: invalid group id

{{ISBN/sandbox}}

ISBN 6300183629 Parameter error in {{ISBN}}: invalid group id

invalid group id
{{ISBN|6310183621}}

{{ISBN}}

ISBN 6310183621 Parameter error in {{ISBN}}: invalid group id

{{ISBN/sandbox}}

ISBN 6310183621 Parameter error in {{ISBN}}: invalid group id

passes

no separators; all digits
{{ISBN|3123467899}}

{{ISBN}}

ISBN 3123467899

{{ISBN/sandbox}}

ISBN 3123467899

no separators; digits + 'X'
{{ISBN|412346789X}}

{{ISBN}}

ISBN 412346789X

{{ISBN/sandbox}}

ISBN 412346789X

hyphen separator; all digits
{{ISBN|3-123467899}}

{{ISBN}}

ISBN 3-123467899

{{ISBN/sandbox}}

ISBN 3-123467899

hyphen separator; digits + 'X'
{{ISBN|4-12346789X}}

{{ISBN}}

ISBN 4-12346789X

{{ISBN/sandbox}}

ISBN 4-12346789X

space separator; all digits
{{ISBN|3 123467899}}

{{ISBN}}

ISBN 3 123467899

{{ISBN/sandbox}}

ISBN 3 123467899

space separator; digits + 'X'
{{ISBN|4 12346789X}}

{{ISBN}}

ISBN 4 12346789X

{{ISBN/sandbox}}

ISBN 4 12346789X

ISBN 13

[edit]

fails

length (too many characters)
{{ISBN|978-01234567866}}

{{ISBN}}

ISBN 978-01234567866 Parameter error in {{ISBN}}: length

{{ISBN/sandbox}}

ISBN 978-01234567866 Parameter error in {{ISBN}}: length

length (too few characters)
{{ISBN|978-012345678}}

{{ISBN}}

ISBN 978-012345678 Parameter error in {{ISBN}}: length

{{ISBN/sandbox}}

ISBN 978-012345678 Parameter error in {{ISBN}}: length

invalid character
{{ISBN|978-012345678X}}

{{ISBN}}

ISBN 978-012345678X Parameter error in {{ISBN}}: invalid character

{{ISBN/sandbox}}

ISBN 978-012345678X Parameter error in {{ISBN}}: invalid character

invalid prefix
{{ISBN|977-0123456786}}

{{ISBN}}

ISBN 977-0123456786 Parameter error in {{ISBN}}: invalid prefix

{{ISBN/sandbox}}

ISBN 977-0123456786 Parameter error in {{ISBN}}: invalid prefix

invalid group id
{{ISBN|979-0123456785}}

{{ISBN}}

ISBN 979-0123456785 Parameter error in {{ISBN}}: invalid group id

{{ISBN/sandbox}}

ISBN 979-0123456785 Parameter error in {{ISBN}}: invalid group id

checksum
{{ISBN|978-0123456788}}

{{ISBN}}

ISBN 978-0123456788 Parameter error in {{ISBN}}: checksum

{{ISBN/sandbox}}

ISBN 978-0123456788 Parameter error in {{ISBN}}: checksum

passes

correct prefix
{{ISBN|9780123456786}}

{{ISBN}}

ISBN 9780123456786

{{ISBN/sandbox}}

ISBN 9780123456786

correct prefix and group id
{{ISBN|9791123456782}}

{{ISBN}}

ISBN 9791123456782

{{ISBN/sandbox}}

ISBN 9791123456782

hyphen separator
{{ISBN|978-0123456786}}

{{ISBN}}

ISBN 978-0123456786

{{ISBN/sandbox}}

ISBN 978-0123456786

hyphen separator
{{ISBN|979-1123456782}}

{{ISBN}}

ISBN 979-1123456782

{{ISBN/sandbox}}

ISBN 979-1123456782

space separator
{{ISBN|978 0123456786}}

{{ISBN}}

ISBN 978 0123456786

{{ISBN/sandbox}}

ISBN 978 0123456786

space separator
{{ISBN|979 1123456782}}

{{ISBN}}

ISBN 979 1123456782

{{ISBN/sandbox}}

ISBN 979 1123456782


Number of ISBNs

[edit]
No arguments
{{ISBN}}

{{ISBN}}

Parameter error in {{ISBN}}: Missing ISBN.

{{ISBN/sandbox}}

Parameter error in {{ISBN}}: Missing ISBN.

Nine ISBNs
{{ISBN|9780123456786|9791123456782|4-12346789X|3123467899|412346789X|978-0123456786|979 1123456782|978 0123456786|9780123456786}}

{{ISBN}}

ISBN 9780123456786, 9791123456782, 4-12346789X, 3123467899, 412346789X, 978-0123456786, 979 1123456782, 978 0123456786, 9780123456786

{{ISBN/sandbox}}

ISBN 9780123456786, 9791123456782, 4-12346789X, 3123467899, 412346789X, 978-0123456786, 979 1123456782, 978 0123456786, 9780123456786