Skip to content

Commit 6dc2014

Browse files
authored
bob: apply "input" policy
Applying #996
1 parent 19b4d9b commit 6dc2014

File tree

1 file changed

+76
-26
lines changed

1 file changed

+76
-26
lines changed

exercises/bob/canonical-data.json

Lines changed: 76 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,205 @@
11
{
22
"exercise": "bob",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"cases": [
55
{
66
"description": "stating something",
77
"property": "response",
8-
"input": "Tom-ay-to, tom-aaaah-to.",
8+
"input": {
9+
"heyBob": "Tom-ay-to, tom-aaaah-to."
10+
},
911
"expected": "Whatever."
1012
},
1113
{
1214
"description": "shouting",
1315
"property": "response",
14-
"input": "WATCH OUT!",
16+
"input": {
17+
"heyBob": "WATCH OUT!"
18+
},
1519
"expected": "Whoa, chill out!"
1620
},
1721
{
1822
"description": "shouting gibberish",
1923
"property": "response",
20-
"input": "FCECDFCAAB",
24+
"input": {
25+
"heyBob": "FCECDFCAAB"
26+
},
2127
"expected": "Whoa, chill out!"
2228
},
2329
{
2430
"description": "asking a question",
2531
"property": "response",
26-
"input": "Does this cryogenic chamber make me look fat?",
32+
"input": {
33+
"heyBob": "Does this cryogenic chamber make me look fat?"
34+
},
2735
"expected": "Sure."
2836
},
2937
{
3038
"description": "asking a numeric question",
3139
"property": "response",
32-
"input": "You are, what, like 15?",
40+
"input": {
41+
"heyBob": "You are, what, like 15?"
42+
},
3343
"expected": "Sure."
3444
},
3545
{
3646
"description": "asking gibberish",
3747
"property": "response",
38-
"input": "fffbbcbeab?",
48+
"input": {
49+
"heyBob": "fffbbcbeab?"
50+
},
3951
"expected": "Sure."
4052
},
4153
{
4254
"description": "talking forcefully",
4355
"property": "response",
44-
"input": "Let's go make out behind the gym!",
56+
"input": {
57+
"heyBob": "Let's go make out behind the gym!"
58+
},
4559
"expected": "Whatever."
4660
},
4761
{
4862
"description": "using acronyms in regular speech",
4963
"property": "response",
50-
"input": "It's OK if you don't want to go to the DMV.",
64+
"input": {
65+
"heyBob": "It's OK if you don't want to go to the DMV."
66+
},
5167
"expected": "Whatever."
5268
},
5369
{
5470
"description": "forceful question",
5571
"property": "response",
56-
"input": "WHAT THE HELL WERE YOU THINKING?",
72+
"input": {
73+
"heyBob": "WHAT THE HELL WERE YOU THINKING?"
74+
},
5775
"expected": "Calm down, I know what I'm doing!"
5876
},
5977
{
6078
"description": "shouting numbers",
6179
"property": "response",
62-
"input": "1, 2, 3 GO!",
80+
"input": {
81+
"heyBob": "1, 2, 3 GO!"
82+
},
6383
"expected": "Whoa, chill out!"
6484
},
6585
{
6686
"description": "only numbers",
6787
"property": "response",
68-
"input": "1, 2, 3",
88+
"input": {
89+
"heyBob": "1, 2, 3"
90+
},
6991
"expected": "Whatever."
7092
},
7193
{
7294
"description": "question with only numbers",
7395
"property": "response",
74-
"input": "4?",
96+
"input": {
97+
"heyBob": "4?"
98+
},
7599
"expected": "Sure."
76100
},
77101
{
78102
"description": "shouting with special characters",
79103
"property": "response",
80-
"input": "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!",
104+
"input": {
105+
"heyBob": "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"
106+
},
81107
"expected": "Whoa, chill out!"
82108
},
83109
{
84110
"description": "shouting with no exclamation mark",
85111
"property": "response",
86-
"input": "I HATE YOU",
112+
"input": {
113+
"heyBob": "I HATE YOU"
114+
},
87115
"expected": "Whoa, chill out!"
88116
},
89117
{
90118
"description": "statement containing question mark",
91119
"property": "response",
92-
"input": "Ending with ? means a question.",
120+
"input": {
121+
"heyBob": "Ending with ? means a question."
122+
},
93123
"expected": "Whatever."
94124
},
95125
{
96126
"description": "non-letters with question",
97127
"property": "response",
98-
"input": ":) ?",
128+
"input": {
129+
"heyBob": ":) ?"
130+
},
99131
"expected": "Sure."
100132
},
101133
{
102134
"description": "prattling on",
103135
"property": "response",
104-
"input": "Wait! Hang on. Are you going to be OK?",
136+
"input": {
137+
"heyBob": "Wait! Hang on. Are you going to be OK?"
138+
},
105139
"expected": "Sure."
106140
},
107141
{
108142
"description": "silence",
109143
"property": "response",
110-
"input": "",
144+
"input": {
145+
"heyBob": ""
146+
},
111147
"expected": "Fine. Be that way!"
112148
},
113149
{
114150
"description": "prolonged silence",
115151
"property": "response",
116-
"input": " ",
152+
"input": {
153+
"heyBob": " "
154+
},
117155
"expected": "Fine. Be that way!"
118156
},
119157
{
120158
"description": "alternate silence",
121159
"property": "response",
122-
"input": "\t\t\t\t\t\t\t\t\t\t",
160+
"input": {
161+
"heyBob": "\t\t\t\t\t\t\t\t\t\t"
162+
},
123163
"expected": "Fine. Be that way!"
124164
},
125165
{
126166
"description": "multiple line question",
127167
"property": "response",
128-
"input": "\nDoes this cryogenic chamber make me look fat?\nno",
168+
"input": {
169+
"heyBob": "\nDoes this cryogenic chamber make me look fat?\nno"
170+
},
129171
"expected": "Whatever."
130172
},
131173
{
132174
"description": "starting with whitespace",
133175
"property": "response",
134-
"input": " hmmmmmmm...",
176+
"input": {
177+
"heyBob": " hmmmmmmm..."
178+
},
135179
"expected": "Whatever."
136180
},
137181
{
138182
"description": "ending with whitespace",
139183
"property": "response",
140-
"input": "Okay if like my spacebar quite a bit? ",
184+
"input": {
185+
"heyBob": "Okay if like my spacebar quite a bit? "
186+
},
141187
"expected": "Sure."
142188
},
143189
{
144190
"description": "other whitespace",
145191
"property": "response",
146-
"input": "\n\r \t",
192+
"input": {
193+
"heyBob": "\n\r \t"
194+
},
147195
"expected": "Fine. Be that way!"
148196
},
149197
{
150198
"description": "non-question ending with whitespace",
151199
"property": "response",
152-
"input": "This is a statement ending with whitespace ",
200+
"input": {
201+
"heyBob": "This is a statement ending with whitespace "
202+
},
153203
"expected": "Whatever."
154204
}
155205
]

0 commit comments

Comments
 (0)