1
- use environment:: Environment ;
2
- use error_chain:: ChainedError ;
3
- use errors:: * ;
4
- use output:: { Output , OutputKind , OutputPredicate } ;
5
1
use std:: default;
6
2
use std:: ffi:: { OsStr , OsString } ;
7
3
use std:: io:: Write ;
8
4
use std:: path:: PathBuf ;
9
5
use std:: process:: { Command , Stdio } ;
10
6
use std:: vec:: Vec ;
11
7
8
+ use environment:: Environment ;
9
+ use error_chain:: ChainedError ;
10
+
11
+ use errors:: * ;
12
+ use output:: { Content , Output , OutputKind , OutputPredicate } ;
13
+
12
14
/// Assertions for a specific command.
13
15
#[ derive( Debug ) ]
14
16
#[ must_use]
@@ -375,7 +377,7 @@ impl Assert {
375
377
376
378
self . expect_output
377
379
. iter ( )
378
- . map ( |a| a. verify_output ( & output) . chain_err ( || ErrorKind :: AssertionFailed ( self . cmd . clone ( ) ) ) )
380
+ . map ( |a| a. verify ( & output) . chain_err ( || ErrorKind :: AssertionFailed ( self . cmd . clone ( ) ) ) )
379
381
. collect :: < Result < Vec < ( ) > > > ( ) ?;
380
382
381
383
Ok ( ( ) )
@@ -419,7 +421,7 @@ impl OutputAssertionBuilder {
419
421
/// .stdout().contains("42")
420
422
/// .unwrap();
421
423
/// ```
422
- pub fn contains < O : Into < String > > ( mut self , output : O ) -> Assert {
424
+ pub fn contains < O : Into < Content > > ( mut self , output : O ) -> Assert {
423
425
let pred = OutputPredicate :: new ( self . kind , Output :: contains ( output) ) ;
424
426
self . assertion . expect_output . push ( pred) ;
425
427
self . assertion
@@ -436,7 +438,7 @@ impl OutputAssertionBuilder {
436
438
/// .stdout().is("42")
437
439
/// .unwrap();
438
440
/// ```
439
- pub fn is < O : Into < String > > ( mut self , output : O ) -> Assert {
441
+ pub fn is < O : Into < Content > > ( mut self , output : O ) -> Assert {
440
442
let pred = OutputPredicate :: new ( self . kind , Output :: is ( output) ) ;
441
443
self . assertion . expect_output . push ( pred) ;
442
444
self . assertion
@@ -453,7 +455,7 @@ impl OutputAssertionBuilder {
453
455
/// .stdout().doesnt_contain("73")
454
456
/// .unwrap();
455
457
/// ```
456
- pub fn doesnt_contain < O : Into < String > > ( mut self , output : O ) -> Assert {
458
+ pub fn doesnt_contain < O : Into < Content > > ( mut self , output : O ) -> Assert {
457
459
let pred = OutputPredicate :: new ( self . kind , Output :: doesnt_contain ( output) ) ;
458
460
self . assertion . expect_output . push ( pred) ;
459
461
self . assertion
@@ -470,7 +472,7 @@ impl OutputAssertionBuilder {
470
472
/// .stdout().isnt("73")
471
473
/// .unwrap();
472
474
/// ```
473
- pub fn isnt < O : Into < String > > ( mut self , output : O ) -> Assert {
475
+ pub fn isnt < O : Into < Content > > ( mut self , output : O ) -> Assert {
474
476
let pred = OutputPredicate :: new ( self . kind , Output :: isnt ( output) ) ;
475
477
self . assertion . expect_output . push ( pred) ;
476
478
self . assertion
0 commit comments