@@ -3,11 +3,11 @@ load bats-extra
33
44# local version: 1.6.0.0
55
6- @test " stating something " {
6+ @test " asking a question " {
77 # [[ $BATS_RUN_SKIPPED == "true" ]] || skip
8- run bash bob.sh ' Tom-ay-to, tom-aaaah-to. '
8+ run bash bob.sh ' Does this cryogenic chamber make me look fat? '
99 assert_success
10- assert_output " Whatever ."
10+ assert_output " Sure ."
1111}
1212
1313@test " shouting" {
@@ -17,18 +17,25 @@ load bats-extra
1717 assert_output " Whoa, chill out!"
1818}
1919
20- @test " shouting gibberish " {
20+ @test " forceful question " {
2121 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
22- run bash bob.sh ' FCECDFCAAB '
22+ run bash bob.sh " WHAT'S GOING ON? "
2323 assert_success
24- assert_output " Whoa, chill out !"
24+ assert_output " Calm down, I know what I'm doing !"
2525}
2626
27- @test " asking a question " {
27+ @test " silence " {
2828 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
29- run bash bob.sh ' Does this cryogenic chamber make me look fat? '
29+ run bash bob.sh ' '
3030 assert_success
31- assert_output " Sure."
31+ assert_output " Fine. Be that way!"
32+ }
33+
34+ @test " stating something" {
35+ [[ $BATS_RUN_SKIPPED == " true" ]] || skip
36+ run bash bob.sh ' Tom-ay-to, tom-aaaah-to.'
37+ assert_success
38+ assert_output " Whatever."
3239}
3340
3441@test " asking a numeric question" {
@@ -45,130 +52,130 @@ load bats-extra
4552 assert_output " Sure."
4653}
4754
48- @test " talking forcefully " {
55+ @test " question with no letters " {
4956 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
50- run bash bob.sh " Hi there! "
57+ run bash bob.sh ' 4? '
5158 assert_success
52- assert_output " Whatever ."
59+ assert_output " Sure ."
5360}
5461
55- @test " using acronyms in regular speech " {
62+ @test " non-letters with question " {
5663 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
57- run bash bob.sh " It's OK if you don't want to go work for NASA. "
64+ run bash bob.sh ' :) ? '
5865 assert_success
59- assert_output " Whatever ."
66+ assert_output " Sure ."
6067}
6168
62- @test " forceful question " {
69+ @test " prattling on " {
6370 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
64- run bash bob.sh " WHAT'S GOING ON? "
71+ run bash bob.sh ' Wait! Hang on. Are you going to be OK? '
6572 assert_success
66- assert_output " Calm down, I know what I'm doing! "
73+ assert_output " Sure. "
6774}
6875
69- @test " shouting numbers " {
76+ @test " ending with whitespace " {
7077 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
71- run bash bob.sh ' 1, 2, 3 GO! '
78+ run bash bob.sh ' Okay if like my spacebar quite a bit? '
7279 assert_success
73- assert_output " Whoa, chill out! "
80+ assert_output " Sure. "
7481}
75-
76- @test " no letters " {
82+ # This test might act differently depending on your platform
83+ @test " multiple line question " {
7784 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
78- run bash bob.sh ' 1, 2, 3 '
85+ run bash bob.sh $' \n Does this cryogenic chamber make \n me look fat? '
7986 assert_success
80- assert_output " Whatever ."
87+ assert_output " Sure ."
8188}
8289
83- @test " question with no letters " {
90+ @test " shouting gibberish " {
8491 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
85- run bash bob.sh ' 4? '
92+ run bash bob.sh ' FCECDFCAAB '
8693 assert_success
87- assert_output " Sure. "
94+ assert_output " Whoa, chill out! "
8895}
8996
90- @test " shouting with special characters " {
91- [[ $BATS_RUN_SKIPPED == " true" ]] || skip
92- run bash bob.sh ' ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1! '
97+ @test " shouting a statement containing a question mark " {
98+ $BATS_RUN_SKIPPED == " true" ]] || skip
99+ run bash bob.sh ' DO LIONS EAT PEOPLE? AHHHHH. '
93100 assert_success
94101 assert_output " Whoa, chill out!"
95102}
96103
97- @test " shouting with no exclamation mark " {
104+ @test " shouting numbers " {
98105 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
99- run bash bob.sh ' I HATE THE DENTIST '
106+ run bash bob.sh ' 1, 2, 3 GO! '
100107 assert_success
101108 assert_output " Whoa, chill out!"
102109}
103110
104- @test " statement containing question mark " {
111+ @test " shouting with special characters " {
105112 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
106- run bash bob.sh ' Ending with ? means a question. '
113+ run bash bob.sh ' ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1! '
107114 assert_success
108- assert_output " Whatever. "
115+ assert_output " Whoa, chill out! "
109116}
110117
111- @test " non-letters with question " {
118+ @test " shouting with no exclamation mark " {
112119 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
113- run bash bob.sh ' :) ? '
120+ run bash bob.sh ' I HATE THE DENTIST '
114121 assert_success
115- assert_output " Sure. "
122+ assert_output " Whoa, chill out! "
116123}
117124
118- @test " prattling on " {
125+ @test " prolonged silence " {
119126 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
120- run bash bob.sh ' Wait! Hang on. Are you going to be OK? '
127+ run bash bob.sh ' '
121128 assert_success
122- assert_output " Sure. "
129+ assert_output " Fine. Be that way! "
123130}
124131
125- @test " silence" {
132+ @test " alternate silence" {
126133 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
127- run bash bob.sh ' '
134+ run bash bob.sh $' \t\t\t\t\t\t\t\t\t\t '
128135 assert_success
129136 assert_output " Fine. Be that way!"
130137}
131138
132- @test " prolonged silence " {
139+ @test " other whitespace " {
133140 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
134- run bash bob.sh ' '
141+ run bash bob.sh $' \n\r \t '
135142 assert_success
136143 assert_output " Fine. Be that way!"
137144}
138145
139- @test " alternate silence " {
146+ @test " talking forcefully " {
140147 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
141- run bash bob.sh $' \t\t\t\t\t\t\t\t\t\t '
148+ run bash bob.sh " Hi there! "
142149 assert_success
143- assert_output " Fine. Be that way! "
150+ assert_output " Whatever. "
144151}
145152
146- @test " multiple line question " {
153+ @test " using acronyms in regular speech " {
147154 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
148- run bash bob.sh $' \n Does this cryogenic chamber make \n me look fat? '
155+ run bash bob.sh " It's OK if you don't want to go work for NASA. "
149156 assert_success
150- assert_output " Sure ."
157+ assert_output " Whatever ."
151158}
152159
153- @test " starting with whitespace " {
160+ @test " no letters " {
154161 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
155- run bash bob.sh ' hmmmmmmm... '
162+ run bash bob.sh ' 1, 2, 3 '
156163 assert_success
157164 assert_output " Whatever."
158165}
159166
160- @test " ending with whitespace " {
167+ @test " statement containing question mark " {
161168 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
162- run bash bob.sh ' Okay if like my spacebar quite a bit? '
169+ run bash bob.sh ' Ending with ? means a question. '
163170 assert_success
164- assert_output " Sure ."
171+ assert_output " Whatever ."
165172}
166- # This test might act differently depending on your platform
167- @test " other whitespace" {
173+
174+ @test " starting with whitespace" {
168175 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
169- run bash bob.sh $' \n\r \t '
176+ run bash bob.sh ' hmmmmmmm... '
170177 assert_success
171- assert_output " Fine. Be that way! "
178+ assert_output " Whatever. "
172179}
173180
174181@test " non-question ending with whitespace" {
@@ -178,14 +185,14 @@ load bats-extra
178185 assert_output " Whatever."
179186}
180187
188+ # bash-specific tests
181189@test " no input is silence" {
182190 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
183191 run bash bob.sh
184192 assert_success
185193 assert_output " Fine. Be that way!"
186194}
187195
188- # bash-specific tests
189196@test " yelling a filename expansion" {
190197 [[ $BATS_RUN_SKIPPED == " true" ]] || skip
191198 run bash bob.sh ' *READ* !'
0 commit comments