-
Notifications
You must be signed in to change notification settings - Fork 38
/
invalid.yml
99 lines (79 loc) · 3.89 KB
/
invalid.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# This file contains test data that should be treated as *invalid* TypeIDs by
# conforming implementations.
#
# Each example contains an invalid TypeID string. Implementations are expected
# to throw an error when attempting to parse/validate these strings.
#
# Last updated: 2024-05-18 (for version 0.3.0 of the spec)
- name: prefix-uppercase
typeid: "PREFIX_00000000000000000000000000"
description: "The prefix should be lowercase with no uppercase letters"
- name: prefix-numeric
typeid: "12345_00000000000000000000000000"
description: "The prefix can't have numbers, it needs to be alphabetic"
- name: prefix-period
typeid: "pre.fix_00000000000000000000000000"
description: "The prefix can't have symbols, it needs to be alphabetic"
# Test removed in v0.3.0 – we now allow underscores in the prefix
# - name: prefix-underscore
# typeid: "pre_fix_00000000000000000000000000"
# description: "The prefix can't have symbols, it needs to be alphabetic"
- name: prefix-non-ascii
typeid: "préfix_00000000000000000000000000"
description: "The prefix can only have ascii letters"
- name: prefix-spaces
typeid: " prefix_00000000000000000000000000"
description: "The prefix can't have any spaces"
- name: prefix-64-chars
# 123456789 123456789 123456789 123456789 123456789 123456789 1234
typeid: "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl_00000000000000000000000000"
description: "The prefix can't be 64 characters, it needs to be 63 characters or less"
- name: separator-empty-prefix
typeid: "_00000000000000000000000000"
description: "If the prefix is empty, the separator should not be there"
- name: separator-empty
typeid: "_"
description: "A separator by itself should not be treated as the empty string"
- name: suffix-short
typeid: "prefix_1234567890123456789012345"
description: "The suffix can't be 25 characters, it needs to be exactly 26 characters"
- name: suffix-long
typeid: "prefix_123456789012345678901234567"
description: "The suffix can't be 27 characters, it needs to be exactly 26 characters"
- name: suffix-spaces
# This example has the right length, so that the failure is caused by the space
# and not the suffix length
typeid: "prefix_1234567890123456789012345 "
description: "The suffix can't have any spaces"
- name: suffix-uppercase
# This example is picked because it would be valid in lowercase
typeid: "prefix_0123456789ABCDEFGHJKMNPQRS"
description: "The suffix should be lowercase with no uppercase letters"
- name: suffix-hyphens
# This example has the right length, so that the failure is caused by the hyphens
# and not the suffix length
typeid: "prefix_123456789-123456789-123456"
description: "The suffix can't have any hyphens"
- name: suffix-wrong-alphabet
typeid: "prefix_ooooooiiiiiiuuuuuuulllllll"
description: "The suffix should only have letters from the spec's alphabet"
- name: suffix-ambiguous-crockford
# This example would be valid if we were using the crockford disambiguation rules
typeid: "prefix_i23456789ol23456789oi23456"
description: "The suffix should not have any ambiguous characters from the crockford encoding"
- name: suffix-hyphens-crockford
# This example would be valid if we were using the crockford hyphenation rules
typeid: "prefix_123456789-0123456789-0123456"
description: "The suffix can't ignore hyphens as in the crockford encoding"
- name: suffix-overflow
# This is the first suffix that overflows into 129 bits
typeid: "prefix_8zzzzzzzzzzzzzzzzzzzzzzzzz"
description: "The suffix should encode at most 128-bits"
# Tests below were added in v0.3.0 when we started allowing '_' within the
# type prefix.
- name: prefix-underscore-start
typeid: "_prefix_00000000000000000000000000"
description: "The prefix can't start with an underscore"
- name: prefix-underscore-end
typeid: "prefix__00000000000000000000000000"
description: "The prefix can't end with an underscore"