File tree 14 files changed +62
-48
lines changed
14 files changed +62
-48
lines changed Original file line number Diff line number Diff line change @@ -1671,30 +1671,6 @@ fn json_artifact_includes_executable_for_benchmark() {
1671
1671
. run ( ) ;
1672
1672
}
1673
1673
1674
- #[ cargo_test]
1675
- fn cargo_bench_no_keep_going ( ) {
1676
- let p = project ( )
1677
- . file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
1678
- . file ( "src/main.rs" , "" )
1679
- . build ( ) ;
1680
-
1681
- p. cargo ( "bench --keep-going" )
1682
- . with_stderr (
1683
- "\
1684
- error: unexpected argument '--keep-going' found
1685
-
1686
- tip: a similar argument exists: '--no-fail-fast'
1687
- tip: use `--no-fail-fast` to run as many tests as possible regardless of failure
1688
-
1689
- Usage: cargo bench [OPTIONS] [BENCHNAME] [-- [args]...]
1690
-
1691
- For more information, try '--help'.
1692
- " ,
1693
- )
1694
- . with_status ( 1 )
1695
- . run ( ) ;
1696
- }
1697
-
1698
1674
#[ cargo_test( nightly, reason = "bench" ) ]
1699
1675
fn cargo_bench_print_env_verbose ( ) {
1700
1676
let p = project ( )
Original file line number Diff line number Diff line change 1
1
mod help;
2
+ mod no_keep_going;
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " foo"
3
+ version = " 0.1.0"
Original file line number Diff line number Diff line change
1
+ use cargo_test_support:: curr_dir;
2
+ use cargo_test_support:: CargoCommand ;
3
+ use cargo_test_support:: Project ;
4
+
5
+ #[ cargo_test]
6
+ fn case ( ) {
7
+ let project = Project :: from_template ( curr_dir ! ( ) . join ( "in" ) ) ;
8
+ let project_root = project. root ( ) ;
9
+ let cwd = & project_root;
10
+
11
+ snapbox:: cmd:: Command :: cargo_ui ( )
12
+ . arg ( "bench" )
13
+ . arg ( "--keep-going" )
14
+ . current_dir ( cwd)
15
+ . assert ( )
16
+ . code ( 1 )
17
+ . stdout_matches_path ( curr_dir ! ( ) . join ( "stdout.log" ) )
18
+ . stderr_matches_path ( curr_dir ! ( ) . join ( "stderr.log" ) ) ;
19
+ }
Original file line number Diff line number Diff line change
1
+ error: unexpected argument '--keep-going' found
2
+
3
+ tip: a similar argument exists: '--no-fail-fast'
4
+ tip: use `--no-fail-fast` to run as many tests as possible regardless of failure
5
+
6
+ Usage: cargo bench [OPTIONS] [BENCHNAME] [-- [args]...]
7
+
8
+ For more information, try '--help'.
Original file line number Diff line number Diff line change 1
1
mod help;
2
+ mod no_keep_going;
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " foo"
3
+ version = " 0.1.0"
Original file line number Diff line number Diff line change
1
+ use cargo_test_support:: curr_dir;
2
+ use cargo_test_support:: CargoCommand ;
3
+ use cargo_test_support:: Project ;
4
+
5
+ #[ cargo_test]
6
+ fn case ( ) {
7
+ let project = Project :: from_template ( curr_dir ! ( ) . join ( "in" ) ) ;
8
+ let project_root = project. root ( ) ;
9
+ let cwd = & project_root;
10
+
11
+ snapbox:: cmd:: Command :: cargo_ui ( )
12
+ . arg ( "test" )
13
+ . arg ( "--keep-going" )
14
+ . current_dir ( cwd)
15
+ . assert ( )
16
+ . code ( 1 )
17
+ . stdout_matches_path ( curr_dir ! ( ) . join ( "stdout.log" ) )
18
+ . stderr_matches_path ( curr_dir ! ( ) . join ( "stderr.log" ) ) ;
19
+ }
Original file line number Diff line number Diff line change
1
+ error: unexpected argument '--keep-going' found
2
+
3
+ tip: a similar argument exists: '--no-fail-fast'
4
+ tip: use `--no-fail-fast` to run as many tests as possible regardless of failure
5
+
6
+ Usage: cargo test [OPTIONS] [TESTNAME] [-- [args]...]
7
+
8
+ For more information, try '--help'.
Original file line number Diff line number Diff line change @@ -4844,30 +4844,6 @@ error: 2 targets failed:
4844
4844
. run ( ) ;
4845
4845
}
4846
4846
4847
- #[ cargo_test]
4848
- fn cargo_test_no_keep_going ( ) {
4849
- let p = project ( )
4850
- . file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
4851
- . file ( "src/main.rs" , "" )
4852
- . build ( ) ;
4853
-
4854
- p. cargo ( "test --keep-going" )
4855
- . with_stderr (
4856
- "\
4857
- error: unexpected argument '--keep-going' found
4858
-
4859
- tip: a similar argument exists: '--no-fail-fast'
4860
- tip: use `--no-fail-fast` to run as many tests as possible regardless of failure
4861
-
4862
- Usage: cargo test [OPTIONS] [TESTNAME] [-- [args]...]
4863
-
4864
- For more information, try '--help'.
4865
- " ,
4866
- )
4867
- . with_status ( 1 )
4868
- . run ( ) ;
4869
- }
4870
-
4871
4847
#[ cargo_test]
4872
4848
fn cargo_test_print_env_verbose ( ) {
4873
4849
let p = project ( )
You can’t perform that action at this time.
0 commit comments