@@ -231,11 +231,14 @@ impl Config {
231
231
}
232
232
233
233
/// Expect an ok status
234
+ #[ deprecated( note = "use `.expect().await.is_ok()` instead" ) ]
235
+ #[ allow( deprecated) ]
234
236
pub async fn expect_ok ( & mut self , args : & [ & str ] ) {
235
237
self . expect_ok_env ( args, & [ ] ) . await
236
238
}
237
239
238
240
/// Expect an ok status with extra environment variables
241
+ #[ deprecated( note = "use `.expect_with_env().await.is_ok()` instead" ) ]
239
242
pub async fn expect_ok_env ( & self , args : & [ & str ] , env : & [ ( & str , & str ) ] ) {
240
243
let out = self . run ( args[ 0 ] , & args[ 1 ..] , env) . await ;
241
244
if !out. ok {
@@ -246,11 +249,14 @@ impl Config {
246
249
}
247
250
248
251
/// Expect an err status and a string in stderr
252
+ #[ deprecated( note = "use `.expect().await.is_err()` instead" ) ]
253
+ #[ allow( deprecated) ]
249
254
pub async fn expect_err ( & self , args : & [ & str ] , expected : & str ) {
250
255
self . expect_err_env ( args, & [ ] , expected) . await
251
256
}
252
257
253
258
/// Expect an err status and a string in stderr, with extra environment variables
259
+ #[ deprecated( note = "use `.expect_with_env().await.is_err()` instead" ) ]
254
260
pub async fn expect_err_env ( & self , args : & [ & str ] , env : & [ ( & str , & str ) ] , expected : & str ) {
255
261
let out = self . run ( args[ 0 ] , & args[ 1 ..] , env) . await ;
256
262
if out. ok || !out. stderr . contains ( expected) {
@@ -262,6 +268,7 @@ impl Config {
262
268
}
263
269
264
270
/// Expect an ok status and a string in stdout
271
+ #[ deprecated( note = "use `.expect().await.is_ok().with_stdout()` instead" ) ]
265
272
pub async fn expect_stdout_ok ( & self , args : & [ & str ] , expected : & str ) {
266
273
let out = self . run ( args[ 0 ] , & args[ 1 ..] , & [ ] ) . await ;
267
274
if !out. ok || !out. stdout . contains ( expected) {
@@ -272,6 +279,7 @@ impl Config {
272
279
}
273
280
}
274
281
282
+ #[ deprecated( note = "use `.expect().await.is_ok().without_stdout()` instead" ) ]
275
283
pub async fn expect_not_stdout_ok ( & self , args : & [ & str ] , expected : & str ) {
276
284
let out = self . run ( args[ 0 ] , & args[ 1 ..] , & [ ] ) . await ;
277
285
if !out. ok || out. stdout . contains ( expected) {
@@ -282,6 +290,7 @@ impl Config {
282
290
}
283
291
}
284
292
293
+ #[ deprecated( note = "use `.expect().await.is_ok().without_stderr()` instead" ) ]
285
294
pub async fn expect_not_stderr_ok ( & self , args : & [ & str ] , expected : & str ) {
286
295
let out = self . run ( args[ 0 ] , & args[ 1 ..] , & [ ] ) . await ;
287
296
if !out. ok || out. stderr . contains ( expected) {
@@ -292,6 +301,7 @@ impl Config {
292
301
}
293
302
}
294
303
304
+ #[ deprecated( note = "use `.expect().await.is_err().without_stderr()` instead" ) ]
295
305
pub async fn expect_not_stderr_err ( & self , args : & [ & str ] , expected : & str ) {
296
306
let out = self . run ( args[ 0 ] , & args[ 1 ..] , & [ ] ) . await ;
297
307
if out. ok || out. stderr . contains ( expected) {
@@ -303,6 +313,7 @@ impl Config {
303
313
}
304
314
305
315
/// Expect an ok status and a string in stderr
316
+ #[ deprecated( note = "use `.expect().await.is_ok().with_stderr()` instead" ) ]
306
317
pub async fn expect_stderr_ok ( & self , args : & [ & str ] , expected : & str ) {
307
318
let out = self . run ( args[ 0 ] , & args[ 1 ..] , & [ ] ) . await ;
308
319
if !out. ok || !out. stderr . contains ( expected) {
@@ -314,12 +325,17 @@ impl Config {
314
325
}
315
326
316
327
/// Expect an exact strings on stdout/stderr with an ok status code
328
+ #[ deprecated( note = "use `.expect().await.is_ok().with_stdout().with_stderr()` instead" ) ]
329
+ #[ allow( deprecated) ]
317
330
pub async fn expect_ok_ex ( & mut self , args : & [ & str ] , stdout : & str , stderr : & str ) {
318
331
self . expect_ok_ex_env ( args, & [ ] , stdout, stderr) . await ;
319
332
}
320
333
321
334
/// Expect an exact strings on stdout/stderr with an ok status code,
322
335
/// with extra environment variables
336
+ #[ deprecated(
337
+ note = "use `.expect_with_env().await.is_ok().with_stdout().with_stderr()` instead"
338
+ ) ]
323
339
pub async fn expect_ok_ex_env (
324
340
& mut self ,
325
341
args : & [ & str ] ,
@@ -342,6 +358,7 @@ impl Config {
342
358
}
343
359
344
360
/// Expect an exact strings on stdout/stderr with an error status code
361
+ #[ deprecated( note = "use `.expect().await.is_err().with_stdout().with_stderr()` instead" ) ]
345
362
pub async fn expect_err_ex ( & self , args : & [ & str ] , stdout : & str , stderr : & str ) {
346
363
let out = self . run ( args[ 0 ] , & args[ 1 ..] , & [ ] ) . await ;
347
364
if out. ok || out. stdout != stdout || out. stderr != stderr {
0 commit comments