File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,14 @@ fn test_pipe() {
150150
151151 let wc_cmd = "wc" ;
152152 assert ! ( run_cmd!( ls | $wc_cmd) . is_ok( ) ) ;
153+
154+ // test pipefail
155+ assert ! ( run_cmd!( false | true ) . is_err( ) ) ;
156+ assert ! ( run_fun!( false | true ) . is_err( ) ) ;
157+ assert ! ( run_fun!( ignore false | true ) . is_ok( ) ) ;
158+ set_pipefail ( false ) ;
159+ assert ! ( run_fun!( false | true ) . is_ok( ) ) ;
160+ set_pipefail ( true ) ;
153161}
154162
155163#[ test]
@@ -255,13 +263,3 @@ fn test_empty_arg() {
255263 let opt = "" ;
256264 assert ! ( run_cmd!( ls $opt) . is_ok( ) ) ;
257265}
258-
259- #[ test]
260- fn test_pipefail_in_fun ( ) {
261- assert ! ( run_cmd!( false | true ) . is_err( ) ) ;
262- assert ! ( run_fun!( false | true ) . is_err( ) ) ;
263- assert ! ( run_fun!( ignore false | true ) . is_ok( ) ) ;
264- set_pipefail ( false ) ;
265- assert ! ( run_fun!( ignore false | true ) . is_ok( ) ) ;
266- set_pipefail ( true ) ;
267- }
You can’t perform that action at this time.
0 commit comments