@@ -171,28 +171,28 @@ spec = do
171
171
let expected = " Raw command: podman exec --detach-keys \"\" ctx bash"
172
172
in show (proc " podman" [" exec" , " --detach-keys" , " " , " ctx" , " bash" ]) `shouldBe` expected
173
173
174
- describe " ProcessConfig" $ do
175
- it " Show shell-escapes arguments" $ do
174
+ describe " Show ProcessConfig" $ do
175
+ it " shell-escapes arguments" $ do
176
176
let processConfig = proc " echo" [" a" , " " , " \" b\" " , " 'c'" , " \\ d" ]
177
177
-- I promise this escaping behavior is correct; paste it into GHCi
178
178
-- `putStrLn` and then paste it into `sh` to verify.
179
179
show processConfig `shouldBe`
180
180
" Raw command: echo a \"\" \"\\\" b\\\"\" \" 'c'\" \"\\\\ d\" "
181
181
182
- it " Show displays working directory" $ do
182
+ it " displays working directory" $ do
183
183
let processConfig = setWorkingDir " puppy/doggy" $ proc " true" []
184
184
show processConfig `shouldBe`
185
185
" Raw command: true\n "
186
186
++ " Run from: puppy/doggy"
187
187
188
- it " Show displays environment (1 variable)" $ do
188
+ it " displays environment (1 variable)" $ do
189
189
let processConfig = setEnv [(" PUPPY" , " DOGGY" )] $ proc " true" []
190
190
show processConfig `shouldBe`
191
191
" Raw command: true\n "
192
192
++ " Environment:\n "
193
193
++ " PUPPY=DOGGY"
194
194
195
- it " Show displays environment (multiple variables)" $ do
195
+ it " displays environment (multiple variables)" $ do
196
196
let processConfig =
197
197
setEnv [ (" PUPPY" , " DOGGY" )
198
198
, (" SOUND" , " AWOO" )
@@ -206,7 +206,7 @@ spec = do
206
206
++ " SOUND=AWOO\n "
207
207
++ " HOWLING=RIGHT_NOW"
208
208
209
- it " Show displays working directory and environment" $ do
209
+ it " displays working directory and environment" $ do
210
210
let processConfig =
211
211
setEnv [ (" PUPPY" , " DOGGY" )
212
212
, (" SOUND" , " AWOO" )
@@ -221,8 +221,8 @@ spec = do
221
221
++ " SOUND=AWOO"
222
222
223
223
224
- describe " ExitCodeException" $ do
225
- it " Show " $ do
224
+ describe " Show ExitCodeException" $ do
225
+ it " shows ExitCodeException " $ do
226
226
-- Note that the `show` output ends with a newline, so functions
227
227
-- like `print` will output an extra blank line at the end of the
228
228
-- output.
@@ -243,7 +243,8 @@ spec = do
243
243
++ " Standard error:\n "
244
244
++ " Uh oh!\n "
245
245
246
- it " Show only stdout" $ do
246
+ context " without stderr" $ do
247
+ it " shows ExitCodeException" $ do
247
248
let exitCodeException =
248
249
ExitCodeException
249
250
{ eceExitCode = ExitFailure 1
@@ -258,7 +259,8 @@ spec = do
258
259
++ " Standard output:\n "
259
260
++ " No puppies found???\n "
260
261
261
- it " Show only stderr" $ do
262
+ context " without stdout" $ do
263
+ it " shows ExitCodeException" $ do
262
264
let exitCodeException =
263
265
ExitCodeException
264
266
{ eceExitCode = ExitFailure 1
@@ -272,7 +274,7 @@ spec = do
272
274
++ " Standard error:\n "
273
275
++ " No puppies found???\n "
274
276
275
- it " Show does not trim stdout/stderr" $ do
277
+ it " does not trim stdout/stderr" $ do
276
278
-- This looks weird, and I think it would be better to strip the
277
279
-- whitespace from the output.
278
280
let exitCodeException =
@@ -292,7 +294,8 @@ spec = do
292
294
++ " Standard error:\n "
293
295
++ " \t \n doggy\n \t\n "
294
296
295
- it " Show displays weirdly with no newlines in stdout" $ do
297
+ context " without newlines in stdout" $ do
298
+ it " shows ExitCodeException" $ do
296
299
-- Sometimes, commands don't output _any_ newlines!
297
300
let exitCodeException =
298
301
ExitCodeException
@@ -308,7 +311,8 @@ spec = do
308
311
++ " Standard output:\n "
309
312
++ " puppy"
310
313
311
- it " Show displays weirdly with no newlines in stdout or stderr" $ do
314
+ context " without newlines in stdout or stderr" $ do
315
+ it " shows ExitCodeException" $ do
312
316
-- If the stderr isn't empty and stdout doesn't end with a newline,
313
317
-- the blank line between the two sections disappears.
314
318
let exitCodeException =
0 commit comments