|
9 | 9 | (test-suite
|
10 | 10 | "bob tests"
|
11 | 11 |
|
12 |
| - (test-equal? "responds to something" |
| 12 | + (test-equal? "stating something" |
13 | 13 | (response-for "To-may-to, tom-aaaah-to.")
|
14 | 14 | "Whatever.")
|
15 | 15 |
|
16 |
| - (test-equal? "responds to shouts" |
| 16 | + (test-equal? "shouting" |
17 | 17 | (response-for "WATCH OUT!")
|
18 | 18 | "Whoa, chill out!")
|
19 | 19 |
|
20 |
| - (test-equal? "responds to questions" |
| 20 | + (test-equal? "shouting gibberish" |
| 21 | + (response-for "FCECDFCAAB") |
| 22 | + "Whoa, chill out!") |
| 23 | + |
| 24 | + (test-equal? "asking a question" |
21 | 25 | (response-for "Does this cryogenic chamber make me look fat?")
|
22 | 26 | "Sure.")
|
23 | 27 |
|
24 |
| - (test-equal? "responds to forceful talking" |
25 |
| - (response-for "Let's go make out behind the gym!") |
| 28 | + (test-equal? "asking a numeric question" |
| 29 | + (response-for "You are, what, like 15?") |
| 30 | + "Sure.") |
| 31 | + |
| 32 | + (test-equal? "asking gibberish" |
| 33 | + (response-for "fffbbcbeab?") |
| 34 | + "Sure.") |
| 35 | + |
| 36 | + (test-equal? "talking forcefully" |
| 37 | + (response-for "Hi there!") |
26 | 38 | "Whatever.")
|
27 | 39 |
|
28 |
| - (test-equal? "responds to acronyms" |
29 |
| - (response-for "It's OK if you don't want to go to the DMV.") |
| 40 | + (test-equal? "using acronyms in regular speech" |
| 41 | + (response-for "It's OK if you don't want to go work for NASA.") |
30 | 42 | "Whatever.")
|
31 | 43 |
|
32 |
| - (test-equal? "responds to forceful questions" |
33 |
| - (response-for "WHAT THE HELL WERE YOU THINKING?") |
| 44 | + (test-equal? "forceful question" |
| 45 | + (response-for "WHAT'S GOING ON?") |
34 | 46 | "Calm down, I know what I'm doing!")
|
35 | 47 |
|
36 |
| - (test-equal? "responds to shouting with special characters" |
37 |
| - (response-for "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!") |
| 48 | + (test-equal? "shouting numbers" |
| 49 | + (response-for "1, 2, 3 GO!") |
38 | 50 | "Whoa, chill out!")
|
39 | 51 |
|
40 |
| - (test-equal? "responds to shouting numbers" |
41 |
| - (response-for "1, 2 ,3, GO!") |
| 52 | + (test-equal? "no letters" |
| 53 | + (response-for "1, 2, 3") |
| 54 | + "Whatever.") |
| 55 | + |
| 56 | + (test-equal? "question with no letters" |
| 57 | + (response-for "4?") |
| 58 | + "Sure.") |
| 59 | + |
| 60 | + (test-equal? "shouting with special characters" |
| 61 | + (response-for "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!") |
42 | 62 | "Whoa, chill out!")
|
43 | 63 |
|
44 |
| - (test-equal? "responds to shouting with no exclamation mark" |
45 |
| - (response-for "I HATE YOU") |
| 64 | + (test-equal? "shouting with no exclamation mark" |
| 65 | + (response-for "I HATE THE DENTIST") |
46 | 66 | "Whoa, chill out!")
|
47 | 67 |
|
48 |
| - (test-equal? "responds to statement containing question mark" |
| 68 | + (test-equal? "statement containing question mark" |
49 | 69 | (response-for "Ending with ? means a question.")
|
50 | 70 | "Whatever.")
|
51 | 71 |
|
52 |
| - (test-equal? "responds to silence" |
| 72 | + (test-equal? "non-letters with question" |
| 73 | + (response-for ":) ?") |
| 74 | + "Sure.") |
| 75 | + |
| 76 | + (test-equal? "prattling on" |
| 77 | + (response-for "Wait! Hang on. Are you going to be OK?") |
| 78 | + "Sure.") |
| 79 | + |
| 80 | + (test-equal? "silence" |
53 | 81 | (response-for "")
|
54 | 82 | "Fine. Be that way!")
|
55 | 83 |
|
56 |
| - (test-equal? "responds to prolonged-silence" |
57 |
| - (response-for " ") |
| 84 | + (test-equal? "prolonged silence" |
| 85 | + (response-for " ") |
58 | 86 | "Fine. Be that way!")
|
59 | 87 |
|
60 |
| - (test-equal? "responds to only-numbers" |
61 |
| - (response-for "1, 2, 3") |
| 88 | + (test-equal? "alternate silence" |
| 89 | + (response-for "\t\t\t\t\t\t\t\t\t\t") |
| 90 | + "Fine. Be that way!") |
| 91 | + |
| 92 | + (test-equal? "multiple line question" |
| 93 | + (response-for "\nDoes this cryogenic chamber make\n me look fat?") |
| 94 | + "Sure.") |
| 95 | + |
| 96 | + (test-equal? "starting with whitespace" |
| 97 | + (response-for " hmmmmmmm...") |
62 | 98 | "Whatever.")
|
63 | 99 |
|
64 |
| - (test-equal? "responds to number-question" |
65 |
| - (response-for "4?") |
66 |
| - "Sure."))) |
| 100 | + (test-equal? "ending with whitespace" |
| 101 | + (response-for "Okay if like my spacebar quite a bit? ") |
| 102 | + "Sure.") |
| 103 | + |
| 104 | + (test-equal? "other whitespace" |
| 105 | + (response-for "\n\r \t") |
| 106 | + "Fine. Be that way!") |
| 107 | + |
| 108 | + (test-equal? "non-question ending with whitespace" |
| 109 | + (response-for "This is a statement ending with whitespace ") |
| 110 | + "Whatever."))) |
67 | 111 |
|
68 | 112 | (run-tests suite))
|
0 commit comments