File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1671,29 +1671,6 @@ fn json_artifact_includes_executable_for_benchmark() {
16711671 . run ( ) ;
16721672}
16731673
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: use `--no-fail-fast` to run as many tests as possible regardless of failure
1687-
1688- Usage: cargo bench [OPTIONS] [BENCHNAME] [-- [args]...]
1689-
1690- For more information, try '--help'.
1691- " ,
1692- )
1693- . with_status ( 1 )
1694- . run ( ) ;
1695- }
1696-
16971674#[ cargo_test( nightly, reason = "bench" ) ]
16981675fn cargo_bench_print_env_verbose ( ) {
16991676 let p = project ( )
Original file line number Diff line number Diff line change 11mod 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: use `--no-fail-fast` to run as many tests as possible regardless of failure
4+
5+ Usage: cargo bench [OPTIONS] [BENCHNAME] [-- [args]...]
6+
7+ For more information, try '--help'.
Original file line number Diff line number Diff line change 11mod 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"
You can’t perform that action at this time.
0 commit comments