@@ -475,7 +475,6 @@ pub struct Execs {
475
475
expect_exit_code : Option < i32 > ,
476
476
expect_stdout_contains : Vec < String > ,
477
477
expect_stderr_contains : Vec < String > ,
478
- expect_either_contains : Vec < String > ,
479
478
expect_stdout_contains_n : Vec < ( String , usize ) > ,
480
479
expect_stdout_not_contains : Vec < String > ,
481
480
expect_stderr_not_contains : Vec < String > ,
@@ -540,15 +539,6 @@ impl Execs {
540
539
self
541
540
}
542
541
543
- /// Verifies that either stdout or stderr contains the given contiguous
544
- /// lines somewhere in its output.
545
- ///
546
- /// See [`compare`] for supported patterns.
547
- pub fn with_either_contains < S : ToString > ( & mut self , expected : S ) -> & mut Self {
548
- self . expect_either_contains . push ( expected. to_string ( ) ) ;
549
- self
550
- }
551
-
552
542
/// Verifies that stdout contains the given contiguous lines somewhere in
553
543
/// its output, and should be repeated `number` times.
554
544
///
@@ -806,7 +796,6 @@ impl Execs {
806
796
&& self . expect_stderr . is_none ( )
807
797
&& self . expect_stdout_contains . is_empty ( )
808
798
&& self . expect_stderr_contains . is_empty ( )
809
- && self . expect_either_contains . is_empty ( )
810
799
&& self . expect_stdout_contains_n . is_empty ( )
811
800
&& self . expect_stdout_not_contains . is_empty ( )
812
801
&& self . expect_stderr_not_contains . is_empty ( )
@@ -917,23 +906,6 @@ impl Execs {
917
906
for expect in self . expect_stderr_unordered . iter ( ) {
918
907
compare:: match_unordered ( expect, stderr, cwd) ?;
919
908
}
920
- for expect in self . expect_either_contains . iter ( ) {
921
- let match_std = compare:: match_contains ( expect, stdout, cwd) ;
922
- let match_err = compare:: match_contains ( expect, stderr, cwd) ;
923
- if let ( Err ( _) , Err ( _) ) = ( match_std, match_err) {
924
- bail ! (
925
- "expected to find:\n \
926
- {}\n \n \
927
- did not find in either output.
928
- --- stdout\n {}\n
929
- --- stderr\n {}\n " ,
930
- expect,
931
- stdout,
932
- stderr,
933
- ) ;
934
- }
935
- }
936
-
937
909
for ( with, without) in self . expect_stderr_with_without . iter ( ) {
938
910
compare:: match_with_without ( stderr, with, without, cwd) ?;
939
911
}
@@ -967,7 +939,6 @@ pub fn execs() -> Execs {
967
939
expect_exit_code : Some ( 0 ) ,
968
940
expect_stdout_contains : Vec :: new ( ) ,
969
941
expect_stderr_contains : Vec :: new ( ) ,
970
- expect_either_contains : Vec :: new ( ) ,
971
942
expect_stdout_contains_n : Vec :: new ( ) ,
972
943
expect_stdout_not_contains : Vec :: new ( ) ,
973
944
expect_stderr_not_contains : Vec :: new ( ) ,
0 commit comments