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