From 1744d35e8058b904f595b4d30ae52cf251cf709e Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Mon, 20 Feb 2023 10:09:04 -0600 Subject: [PATCH 1/5] chore: Remove unneeded `#[test]` --- tests/testsuite/cargo_command.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs index 5eb9bb274c9..f07cec332a6 100644 --- a/tests/testsuite/cargo_command.rs +++ b/tests/testsuite/cargo_command.rs @@ -433,7 +433,6 @@ fn cargo_cmd_bins_vs_explicit_path() { } } -#[test] #[cargo_test] fn cargo_subcommand_args() { let p = echo_subcommand(); From 9708e6f62d3be723a69532d06c84d854050c8b0c Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Mon, 20 Feb 2023 10:13:25 -0600 Subject: [PATCH 2/5] refactor: Make two tests stderr not match their test name --- tests/testsuite/bad_config.rs | 2 +- tests/testsuite/build_script.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index a6fe93cf39a..08215ffabb3 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -20,7 +20,7 @@ fn bad1() { .with_stderr( "\ [ERROR] expected table for configuration key `target.nonexistent-target`, \ -but found string in [..]config +but found string in [..]/config ", ) .run(); diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index d5ee1f99c9a..ccccfca71a0 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -3707,7 +3707,7 @@ fn panic_abort_with_build_scripts() { p.root().join("target").rm_rf(); p.cargo("test --release -v") - .with_stderr_does_not_contain("[..]panic[..]") + .with_stderr_does_not_contain("[..]panic=abort[..]") .run(); } From 08c6bb8446db2595ece6e91205cb0ac19bf960b7 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Mon, 20 Feb 2023 11:25:14 -0600 Subject: [PATCH 3/5] refactor: Rename test names to `case` for `cargo_add` --- tests/testsuite/cargo_add/add_basic/mod.rs | 2 +- tests/testsuite/cargo_add/add_multiple/mod.rs | 2 +- tests/testsuite/cargo_add/add_normalized_name_external/mod.rs | 2 +- tests/testsuite/cargo_add/build/mod.rs | 2 +- tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs | 2 +- tests/testsuite/cargo_add/change_rename_target/mod.rs | 2 +- tests/testsuite/cargo_add/default_features/mod.rs | 2 +- tests/testsuite/cargo_add/deprecated_default_features/mod.rs | 2 +- tests/testsuite/cargo_add/deprecated_section/mod.rs | 2 +- tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs | 2 +- .../cargo_add/detect_workspace_inherit_features/mod.rs | 2 +- .../cargo_add/detect_workspace_inherit_optional/mod.rs | 2 +- tests/testsuite/cargo_add/dev/mod.rs | 2 +- tests/testsuite/cargo_add/dev_build_conflict/mod.rs | 2 +- tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs | 2 +- tests/testsuite/cargo_add/dry_run/mod.rs | 2 +- tests/testsuite/cargo_add/features/mod.rs | 2 +- tests/testsuite/cargo_add/features_empty/mod.rs | 2 +- tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs | 2 +- tests/testsuite/cargo_add/features_preserve/mod.rs | 2 +- tests/testsuite/cargo_add/features_spaced_values/mod.rs | 2 +- tests/testsuite/cargo_add/features_unknown/mod.rs | 2 +- tests/testsuite/cargo_add/features_unknown_no_features/mod.rs | 2 +- tests/testsuite/cargo_add/git/mod.rs | 2 +- tests/testsuite/cargo_add/git_branch/mod.rs | 2 +- tests/testsuite/cargo_add/git_conflicts_namever/mod.rs | 2 +- tests/testsuite/cargo_add/git_dev/mod.rs | 2 +- tests/testsuite/cargo_add/git_inferred_name/mod.rs | 2 +- tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs | 2 +- tests/testsuite/cargo_add/git_multiple_names/mod.rs | 2 +- tests/testsuite/cargo_add/git_normalized_name/mod.rs | 2 +- tests/testsuite/cargo_add/git_registry/mod.rs | 2 +- tests/testsuite/cargo_add/git_rev/mod.rs | 2 +- tests/testsuite/cargo_add/git_tag/mod.rs | 2 +- tests/testsuite/cargo_add/infer_prerelease/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_arg/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_git_external/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_git_name/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs | 2 +- .../cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs | 2 +- .../cargo_add/invalid_key_rename_inherit_dependency/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_manifest/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_name_external/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_path/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_path_name/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_path_self/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_target_empty/mod.rs | 2 +- tests/testsuite/cargo_add/invalid_vers/mod.rs | 2 +- tests/testsuite/cargo_add/list_features/mod.rs | 2 +- tests/testsuite/cargo_add/list_features_path/mod.rs | 2 +- tests/testsuite/cargo_add/list_features_path_no_default/mod.rs | 2 +- tests/testsuite/cargo_add/locked_changed/mod.rs | 2 +- tests/testsuite/cargo_add/locked_unchanged/mod.rs | 2 +- tests/testsuite/cargo_add/lockfile_updated/mod.rs | 2 +- tests/testsuite/cargo_add/manifest_path_package/mod.rs | 2 +- tests/testsuite/cargo_add/merge_activated_features/mod.rs | 2 +- .../testsuite/cargo_add/multiple_conflicts_with_features/mod.rs | 2 +- tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs | 2 +- tests/testsuite/cargo_add/namever/mod.rs | 2 +- tests/testsuite/cargo_add/no_args/mod.rs | 2 +- tests/testsuite/cargo_add/no_default_features/mod.rs | 2 +- tests/testsuite/cargo_add/no_optional/mod.rs | 2 +- tests/testsuite/cargo_add/offline_empty_cache/mod.rs | 2 +- tests/testsuite/cargo_add/optional/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_default_features/mod.rs | 2 +- .../overwrite_default_features_with_no_default_features/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_features/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs | 2 +- .../testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs | 2 +- .../testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_inline_features/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_name_noop/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs | 2 +- .../overwrite_no_default_features_with_default_features/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_no_optional/mod.rs | 2 +- .../cargo_add/overwrite_no_optional_with_optional/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_optional/mod.rs | 2 +- .../cargo_add/overwrite_optional_with_no_optional/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_path_noop/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs | 2 +- .../testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs | 2 +- .../testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs | 2 +- .../cargo_add/overwrite_rename_with_rename_noop/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_with_rename/mod.rs | 2 +- tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs | 2 +- .../testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs | 2 +- tests/testsuite/cargo_add/path/mod.rs | 2 +- tests/testsuite/cargo_add/path_dev/mod.rs | 2 +- tests/testsuite/cargo_add/path_inferred_name/mod.rs | 2 +- .../cargo_add/path_inferred_name_conflicts_full_feature/mod.rs | 2 +- tests/testsuite/cargo_add/path_normalized_name/mod.rs | 2 +- tests/testsuite/cargo_add/preserve_sorted/mod.rs | 2 +- tests/testsuite/cargo_add/preserve_unsorted/mod.rs | 2 +- tests/testsuite/cargo_add/quiet/mod.rs | 2 +- tests/testsuite/cargo_add/registry/mod.rs | 2 +- tests/testsuite/cargo_add/rename/mod.rs | 2 +- tests/testsuite/cargo_add/require_weak/mod.rs | 2 +- tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs | 2 +- tests/testsuite/cargo_add/target/mod.rs | 2 +- tests/testsuite/cargo_add/target_cfg/mod.rs | 2 +- tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs | 2 +- tests/testsuite/cargo_add/vers/mod.rs | 2 +- tests/testsuite/cargo_add/workspace_name/mod.rs | 2 +- tests/testsuite/cargo_add/workspace_path/mod.rs | 2 +- tests/testsuite/cargo_add/workspace_path_dev/mod.rs | 2 +- 110 files changed, 110 insertions(+), 110 deletions(-) diff --git a/tests/testsuite/cargo_add/add_basic/mod.rs b/tests/testsuite/cargo_add/add_basic/mod.rs index c22c63bd293..33889dffa5f 100644 --- a/tests/testsuite/cargo_add/add_basic/mod.rs +++ b/tests/testsuite/cargo_add/add_basic/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn add_basic() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/add_multiple/mod.rs b/tests/testsuite/cargo_add/add_multiple/mod.rs index ada47c9aa7b..a9cc205751c 100644 --- a/tests/testsuite/cargo_add/add_multiple/mod.rs +++ b/tests/testsuite/cargo_add/add_multiple/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn add_multiple() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs b/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs index 927c120fc64..63605d8dc92 100644 --- a/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs +++ b/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn add_normalized_name_external() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/build/mod.rs b/tests/testsuite/cargo_add/build/mod.rs index 133c2b2f8de..130ecfbb0b5 100644 --- a/tests/testsuite/cargo_add/build/mod.rs +++ b/tests/testsuite/cargo_add/build/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn build() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs b/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs index 8b66ac4c1f5..b0bb2e03bb2 100644 --- a/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs +++ b/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use crate::cargo_add::init_alt_registry; #[cargo_test] -fn build_prefer_existing_version() { +fn case() { init_alt_registry(); let project = Project::from_template("tests/testsuite/cargo_add/build_prefer_existing_version/in"); diff --git a/tests/testsuite/cargo_add/change_rename_target/mod.rs b/tests/testsuite/cargo_add/change_rename_target/mod.rs index f9d024ef683..94309b3ab1b 100644 --- a/tests/testsuite/cargo_add/change_rename_target/mod.rs +++ b/tests/testsuite/cargo_add/change_rename_target/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn change_rename_target() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/default_features/mod.rs b/tests/testsuite/cargo_add/default_features/mod.rs index 20faf8d00d9..88bdd8065fb 100644 --- a/tests/testsuite/cargo_add/default_features/mod.rs +++ b/tests/testsuite/cargo_add/default_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn default_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/deprecated_default_features/mod.rs b/tests/testsuite/cargo_add/deprecated_default_features/mod.rs index 78418b88fa9..10d4e4e988b 100644 --- a/tests/testsuite/cargo_add/deprecated_default_features/mod.rs +++ b/tests/testsuite/cargo_add/deprecated_default_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn deprecated_default_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/deprecated_section/mod.rs b/tests/testsuite/cargo_add/deprecated_section/mod.rs index 363b088ac48..10d4e4e988b 100644 --- a/tests/testsuite/cargo_add/deprecated_section/mod.rs +++ b/tests/testsuite/cargo_add/deprecated_section/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn deprecated_section() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs b/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs index 340296f7ef0..065fb4f9347 100644 --- a/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs +++ b/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn detect_workspace_inherit() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs b/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs index 09888ff9741..11ab2b1bfaa 100644 --- a/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs +++ b/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn detect_workspace_inherit_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs b/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs index d6cd3ac83cb..7557b520daa 100644 --- a/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs +++ b/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn detect_workspace_inherit_optional() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/dev/mod.rs b/tests/testsuite/cargo_add/dev/mod.rs index feb869b85a3..112e922850d 100644 --- a/tests/testsuite/cargo_add/dev/mod.rs +++ b/tests/testsuite/cargo_add/dev/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn dev() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/dev_build_conflict/mod.rs b/tests/testsuite/cargo_add/dev_build_conflict/mod.rs index 01d60d6967e..3f57c6b76a6 100644 --- a/tests/testsuite/cargo_add/dev_build_conflict/mod.rs +++ b/tests/testsuite/cargo_add/dev_build_conflict/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn dev_build_conflict() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs b/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs index b0b094a7125..1785ac8202d 100644 --- a/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs +++ b/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_alt_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn dev_prefer_existing_version() { +fn case() { init_alt_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/dry_run/mod.rs b/tests/testsuite/cargo_add/dry_run/mod.rs index 34cffc7fb57..209d20873de 100644 --- a/tests/testsuite/cargo_add/dry_run/mod.rs +++ b/tests/testsuite/cargo_add/dry_run/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn dry_run() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/features/mod.rs b/tests/testsuite/cargo_add/features/mod.rs index 3cb26c03c3a..5e4115390f0 100644 --- a/tests/testsuite/cargo_add/features/mod.rs +++ b/tests/testsuite/cargo_add/features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/features_empty/mod.rs b/tests/testsuite/cargo_add/features_empty/mod.rs index e38b0716ad5..81dffc1ee81 100644 --- a/tests/testsuite/cargo_add/features_empty/mod.rs +++ b/tests/testsuite/cargo_add/features_empty/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn features_empty() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs b/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs index 35b6700e1be..db47f860d0c 100644 --- a/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs +++ b/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn features_multiple_occurrences() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/features_preserve/mod.rs b/tests/testsuite/cargo_add/features_preserve/mod.rs index c57754ce387..ed99a31110e 100644 --- a/tests/testsuite/cargo_add/features_preserve/mod.rs +++ b/tests/testsuite/cargo_add/features_preserve/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn features_preserve() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/features_spaced_values/mod.rs b/tests/testsuite/cargo_add/features_spaced_values/mod.rs index 99254f1bc8b..2ef212e59e8 100644 --- a/tests/testsuite/cargo_add/features_spaced_values/mod.rs +++ b/tests/testsuite/cargo_add/features_spaced_values/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn features_spaced_values() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/features_unknown/mod.rs b/tests/testsuite/cargo_add/features_unknown/mod.rs index 59b2a9b94e3..7fd8d95291b 100644 --- a/tests/testsuite/cargo_add/features_unknown/mod.rs +++ b/tests/testsuite/cargo_add/features_unknown/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn features_unknown() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs b/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs index 6cb6ac4f921..9f59a035308 100644 --- a/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs +++ b/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn features_unknown_no_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git/mod.rs b/tests/testsuite/cargo_add/git/mod.rs index 97fd733d997..bd82b301550 100644 --- a/tests/testsuite/cargo_add/git/mod.rs +++ b/tests/testsuite/cargo_add/git/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_branch/mod.rs b/tests/testsuite/cargo_add/git_branch/mod.rs index 946a715fe8d..051564566e6 100644 --- a/tests/testsuite/cargo_add/git_branch/mod.rs +++ b/tests/testsuite/cargo_add/git_branch/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_branch() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs b/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs index eb6d3da12ab..f123298ae3e 100644 --- a/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs +++ b/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_conflicts_namever() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_dev/mod.rs b/tests/testsuite/cargo_add/git_dev/mod.rs index b810a16f4e7..9e14a4007f3 100644 --- a/tests/testsuite/cargo_add/git_dev/mod.rs +++ b/tests/testsuite/cargo_add/git_dev/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_dev() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_inferred_name/mod.rs b/tests/testsuite/cargo_add/git_inferred_name/mod.rs index 0ee76f422de..52183adf447 100644 --- a/tests/testsuite/cargo_add/git_inferred_name/mod.rs +++ b/tests/testsuite/cargo_add/git_inferred_name/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_inferred_name() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs b/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs index f5c3f4d036a..a708a8ae79a 100644 --- a/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs +++ b/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_inferred_name_multiple() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_multiple_names/mod.rs b/tests/testsuite/cargo_add/git_multiple_names/mod.rs index 57771ce282b..39eb6e6267d 100644 --- a/tests/testsuite/cargo_add/git_multiple_names/mod.rs +++ b/tests/testsuite/cargo_add/git_multiple_names/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_multiple_names() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_normalized_name/mod.rs b/tests/testsuite/cargo_add/git_normalized_name/mod.rs index 47d09953eee..03d861856c5 100644 --- a/tests/testsuite/cargo_add/git_normalized_name/mod.rs +++ b/tests/testsuite/cargo_add/git_normalized_name/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_normalized_name() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_registry/mod.rs b/tests/testsuite/cargo_add/git_registry/mod.rs index b546f63abef..6bf6f89333b 100644 --- a/tests/testsuite/cargo_add/git_registry/mod.rs +++ b/tests/testsuite/cargo_add/git_registry/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_alt_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_registry() { +fn case() { init_alt_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_rev/mod.rs b/tests/testsuite/cargo_add/git_rev/mod.rs index 17600a3eb7d..612607203ed 100644 --- a/tests/testsuite/cargo_add/git_rev/mod.rs +++ b/tests/testsuite/cargo_add/git_rev/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_rev() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/git_tag/mod.rs b/tests/testsuite/cargo_add/git_tag/mod.rs index de7f6903ea9..b355b17067e 100644 --- a/tests/testsuite/cargo_add/git_tag/mod.rs +++ b/tests/testsuite/cargo_add/git_tag/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn git_tag() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/infer_prerelease/mod.rs b/tests/testsuite/cargo_add/infer_prerelease/mod.rs index 5f27752f556..94533f9793c 100644 --- a/tests/testsuite/cargo_add/infer_prerelease/mod.rs +++ b/tests/testsuite/cargo_add/infer_prerelease/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn infer_prerelease() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_arg/mod.rs b/tests/testsuite/cargo_add/invalid_arg/mod.rs index ea2aebc7794..265a571bc46 100644 --- a/tests/testsuite/cargo_add/invalid_arg/mod.rs +++ b/tests/testsuite/cargo_add/invalid_arg/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_arg() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_git_external/mod.rs b/tests/testsuite/cargo_add/invalid_git_external/mod.rs index 31336799c9a..705182f2028 100644 --- a/tests/testsuite/cargo_add/invalid_git_external/mod.rs +++ b/tests/testsuite/cargo_add/invalid_git_external/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_git_external() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_git_name/mod.rs b/tests/testsuite/cargo_add/invalid_git_name/mod.rs index 07ff6452996..0aff8c090d2 100644 --- a/tests/testsuite/cargo_add/invalid_git_name/mod.rs +++ b/tests/testsuite/cargo_add/invalid_git_name/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_git_name() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs b/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs index 4efbaf97479..837293e5fe7 100644 --- a/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs +++ b/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_key_inherit_dependency() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; diff --git a/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs b/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs index c0a187eb0a1..837293e5fe7 100644 --- a/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs +++ b/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_key_overwrite_inherit_dependency() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; diff --git a/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs b/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs index 30dedc50ab1..bee132560d0 100644 --- a/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs +++ b/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_key_rename_inherit_dependency() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; diff --git a/tests/testsuite/cargo_add/invalid_manifest/mod.rs b/tests/testsuite/cargo_add/invalid_manifest/mod.rs index 2a6458278b5..e385cfc3f1e 100644 --- a/tests/testsuite/cargo_add/invalid_manifest/mod.rs +++ b/tests/testsuite/cargo_add/invalid_manifest/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_manifest() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_name_external/mod.rs b/tests/testsuite/cargo_add/invalid_name_external/mod.rs index 5db9044fb77..16e04173815 100644 --- a/tests/testsuite/cargo_add/invalid_name_external/mod.rs +++ b/tests/testsuite/cargo_add/invalid_name_external/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_name_external() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_path/mod.rs b/tests/testsuite/cargo_add/invalid_path/mod.rs index 90255f3ae04..0d26b552d02 100644 --- a/tests/testsuite/cargo_add/invalid_path/mod.rs +++ b/tests/testsuite/cargo_add/invalid_path/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_path() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_path_name/mod.rs b/tests/testsuite/cargo_add/invalid_path_name/mod.rs index 870c70f1c4c..10d841475bb 100644 --- a/tests/testsuite/cargo_add/invalid_path_name/mod.rs +++ b/tests/testsuite/cargo_add/invalid_path_name/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_path_name() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_path_self/mod.rs b/tests/testsuite/cargo_add/invalid_path_self/mod.rs index 314a5cdbb0f..a64190f4466 100644 --- a/tests/testsuite/cargo_add/invalid_path_self/mod.rs +++ b/tests/testsuite/cargo_add/invalid_path_self/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_path_self() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_target_empty/mod.rs b/tests/testsuite/cargo_add/invalid_target_empty/mod.rs index 101c03d2586..da93c4eb808 100644 --- a/tests/testsuite/cargo_add/invalid_target_empty/mod.rs +++ b/tests/testsuite/cargo_add/invalid_target_empty/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_target_empty() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/invalid_vers/mod.rs b/tests/testsuite/cargo_add/invalid_vers/mod.rs index ac201c1f7c2..c3b4d1f97e3 100644 --- a/tests/testsuite/cargo_add/invalid_vers/mod.rs +++ b/tests/testsuite/cargo_add/invalid_vers/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_vers() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/list_features/mod.rs b/tests/testsuite/cargo_add/list_features/mod.rs index 9f98f51859d..e1e1b212fd7 100644 --- a/tests/testsuite/cargo_add/list_features/mod.rs +++ b/tests/testsuite/cargo_add/list_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn list_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/list_features_path/mod.rs b/tests/testsuite/cargo_add/list_features_path/mod.rs index 0cb284012d5..22733b883f7 100644 --- a/tests/testsuite/cargo_add/list_features_path/mod.rs +++ b/tests/testsuite/cargo_add/list_features_path/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn list_features_path() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs b/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs index e0fd87a6565..f520b2aca1c 100644 --- a/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs +++ b/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn list_features_path_no_default() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/locked_changed/mod.rs b/tests/testsuite/cargo_add/locked_changed/mod.rs index f4156f8e5f0..9e3e57fe529 100644 --- a/tests/testsuite/cargo_add/locked_changed/mod.rs +++ b/tests/testsuite/cargo_add/locked_changed/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn locked_changed() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/locked_unchanged/mod.rs b/tests/testsuite/cargo_add/locked_unchanged/mod.rs index 8352155f93e..aba9918f767 100644 --- a/tests/testsuite/cargo_add/locked_unchanged/mod.rs +++ b/tests/testsuite/cargo_add/locked_unchanged/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn locked_unchanged() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/lockfile_updated/mod.rs b/tests/testsuite/cargo_add/lockfile_updated/mod.rs index 41d39efdf5d..33889dffa5f 100644 --- a/tests/testsuite/cargo_add/lockfile_updated/mod.rs +++ b/tests/testsuite/cargo_add/lockfile_updated/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn lockfile_updated() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/manifest_path_package/mod.rs b/tests/testsuite/cargo_add/manifest_path_package/mod.rs index 3cc3b17154d..008c2d33d75 100644 --- a/tests/testsuite/cargo_add/manifest_path_package/mod.rs +++ b/tests/testsuite/cargo_add/manifest_path_package/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn manifest_path_package() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/merge_activated_features/mod.rs b/tests/testsuite/cargo_add/merge_activated_features/mod.rs index dcd6fac269c..161783282fd 100644 --- a/tests/testsuite/cargo_add/merge_activated_features/mod.rs +++ b/tests/testsuite/cargo_add/merge_activated_features/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn merge_activated_features() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; diff --git a/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs b/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs index 4a423bb195a..10f824484c7 100644 --- a/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs +++ b/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn multiple_conflicts_with_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs b/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs index 66520f2348f..293ed3eeacb 100644 --- a/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs +++ b/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn multiple_conflicts_with_rename() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/namever/mod.rs b/tests/testsuite/cargo_add/namever/mod.rs index 3bd342d33bf..90fda1a9f30 100644 --- a/tests/testsuite/cargo_add/namever/mod.rs +++ b/tests/testsuite/cargo_add/namever/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn namever() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/no_args/mod.rs b/tests/testsuite/cargo_add/no_args/mod.rs index 3217904a90f..7eca17b5618 100644 --- a/tests/testsuite/cargo_add/no_args/mod.rs +++ b/tests/testsuite/cargo_add/no_args/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn no_args() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/no_default_features/mod.rs b/tests/testsuite/cargo_add/no_default_features/mod.rs index e9be3a11145..e72ca3be22c 100644 --- a/tests/testsuite/cargo_add/no_default_features/mod.rs +++ b/tests/testsuite/cargo_add/no_default_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn no_default_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/no_optional/mod.rs b/tests/testsuite/cargo_add/no_optional/mod.rs index 31de606df49..fdb983b216e 100644 --- a/tests/testsuite/cargo_add/no_optional/mod.rs +++ b/tests/testsuite/cargo_add/no_optional/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn no_optional() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/offline_empty_cache/mod.rs b/tests/testsuite/cargo_add/offline_empty_cache/mod.rs index 5bac2b06546..ae748597960 100644 --- a/tests/testsuite/cargo_add/offline_empty_cache/mod.rs +++ b/tests/testsuite/cargo_add/offline_empty_cache/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn offline_empty_cache() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/optional/mod.rs b/tests/testsuite/cargo_add/optional/mod.rs index c5e5cb79eca..94d1cbf3423 100644 --- a/tests/testsuite/cargo_add/optional/mod.rs +++ b/tests/testsuite/cargo_add/optional/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn optional() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_default_features/mod.rs index 5c6428c709b..88bdd8065fb 100644 --- a/tests/testsuite/cargo_add/overwrite_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_default_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_default_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs index d7a8b7f6024..e72ca3be22c 100644 --- a/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_default_features_with_no_default_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_features/mod.rs b/tests/testsuite/cargo_add/overwrite_features/mod.rs index 65313115b51..0b2ab18b8c2 100644 --- a/tests/testsuite/cargo_add/overwrite_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs b/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs index fe73cea65cf..ab89e3a6da2 100644 --- a/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_git_with_path() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs index 116b5d7d335..161783282fd 100644 --- a/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_inherit_features_noop() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; diff --git a/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs index 95d0b2a3ebd..065fb4f9347 100644 --- a/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_inherit_noop() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs index 9bc72b2df13..065fb4f9347 100644 --- a/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_inherit_optional_noop() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs b/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs index 176eba524d0..356b4d788c6 100644 --- a/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_inline_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs index 68ebd4bf4d3..b418c780964 100644 --- a/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_alt_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_name_dev_noop() { +fn case() { init_alt_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs index 545e78fc798..193c5880b5d 100644 --- a/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_alt_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_name_noop() { +fn case() { init_alt_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs index d7955312268..e72ca3be22c 100644 --- a/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_no_default_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs index 8b21a98a397..88bdd8065fb 100644 --- a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_no_default_features_with_default_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs index 4c0601332c8..fdb983b216e 100644 --- a/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_no_optional() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs index 983a6869dac..94d1cbf3423 100644 --- a/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_no_optional_with_optional() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_optional/mod.rs index 4a653e3b39b..94d1cbf3423 100644 --- a/tests/testsuite/cargo_add/overwrite_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_optional/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_optional() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs index fce33e2a66b..c34c293f99c 100644 --- a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_optional_with_no_optional() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs index b89f65bd446..f04405a343c 100644 --- a/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_alt_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_path_noop() { +fn case() { init_alt_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs b/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs index 52f5ce274a0..32674e23d27 100644 --- a/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_path_with_version() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs index 1faf5de3ec4..0b2ab18b8c2 100644 --- a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_preserves_inline_table() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs b/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs index 599bf827a6a..a006c95fd48 100644 --- a/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_rename_with_no_rename() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs b/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs index 4c265ebf2c7..e14282bc18e 100644 --- a/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_rename_with_rename() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs index 2050dec2bfa..c0ca2e552a0 100644 --- a/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_rename_with_rename_noop() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs b/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs index 7df627082a7..ce7a0acb0fb 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_version_with_git() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs b/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs index 2653fc550aa..ab89e3a6da2 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_version_with_path() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs b/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs index 078beb0e23f..05cc2d10925 100644 --- a/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_with_rename() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs b/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs index b87a125ab8f..87ed58f7f97 100644 --- a/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_workspace_dep() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs index de7d8e4444a..87ed58f7f97 100644 --- a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn overwrite_workspace_dep_features() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/path/mod.rs b/tests/testsuite/cargo_add/path/mod.rs index a619d36b4ad..ab89e3a6da2 100644 --- a/tests/testsuite/cargo_add/path/mod.rs +++ b/tests/testsuite/cargo_add/path/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn path() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/path_dev/mod.rs b/tests/testsuite/cargo_add/path_dev/mod.rs index cecb91afa67..4ae04c70abb 100644 --- a/tests/testsuite/cargo_add/path_dev/mod.rs +++ b/tests/testsuite/cargo_add/path_dev/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn path_dev() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/path_inferred_name/mod.rs b/tests/testsuite/cargo_add/path_inferred_name/mod.rs index bd947c5bbf4..ab89e3a6da2 100644 --- a/tests/testsuite/cargo_add/path_inferred_name/mod.rs +++ b/tests/testsuite/cargo_add/path_inferred_name/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn path_inferred_name() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs b/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs index 74d1a5a4217..eadd096aab3 100644 --- a/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs +++ b/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn path_inferred_name_conflicts_full_feature() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/path_normalized_name/mod.rs b/tests/testsuite/cargo_add/path_normalized_name/mod.rs index 27b6a93f9e8..754f2783f68 100644 --- a/tests/testsuite/cargo_add/path_normalized_name/mod.rs +++ b/tests/testsuite/cargo_add/path_normalized_name/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn path_normalized_name() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/preserve_sorted/mod.rs b/tests/testsuite/cargo_add/preserve_sorted/mod.rs index b5c80e56f33..4dfb06ed1d7 100644 --- a/tests/testsuite/cargo_add/preserve_sorted/mod.rs +++ b/tests/testsuite/cargo_add/preserve_sorted/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn preserve_sorted() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/preserve_unsorted/mod.rs b/tests/testsuite/cargo_add/preserve_unsorted/mod.rs index 826c8db3240..4dfb06ed1d7 100644 --- a/tests/testsuite/cargo_add/preserve_unsorted/mod.rs +++ b/tests/testsuite/cargo_add/preserve_unsorted/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn preserve_unsorted() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/quiet/mod.rs b/tests/testsuite/cargo_add/quiet/mod.rs index e3f93a8bd5f..35784390125 100644 --- a/tests/testsuite/cargo_add/quiet/mod.rs +++ b/tests/testsuite/cargo_add/quiet/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn quiet() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/registry/mod.rs b/tests/testsuite/cargo_add/registry/mod.rs index 1af58d6be28..d5ba9ef282e 100644 --- a/tests/testsuite/cargo_add/registry/mod.rs +++ b/tests/testsuite/cargo_add/registry/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_alt_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn registry() { +fn case() { init_alt_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/rename/mod.rs b/tests/testsuite/cargo_add/rename/mod.rs index c172ea77ae5..3fefcccf32d 100644 --- a/tests/testsuite/cargo_add/rename/mod.rs +++ b/tests/testsuite/cargo_add/rename/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn rename() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/require_weak/mod.rs b/tests/testsuite/cargo_add/require_weak/mod.rs index f5c81886d28..d99e4482a29 100644 --- a/tests/testsuite/cargo_add/require_weak/mod.rs +++ b/tests/testsuite/cargo_add/require_weak/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn require_weak() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs b/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs index ea17ebf222d..55e4c2281d9 100644 --- a/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs +++ b/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn sorted_table_with_dotted_item() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/target/mod.rs b/tests/testsuite/cargo_add/target/mod.rs index 6a6eae8a87b..e263bad3695 100644 --- a/tests/testsuite/cargo_add/target/mod.rs +++ b/tests/testsuite/cargo_add/target/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn target() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/target_cfg/mod.rs b/tests/testsuite/cargo_add/target_cfg/mod.rs index fde161c886b..43efe8e8d33 100644 --- a/tests/testsuite/cargo_add/target_cfg/mod.rs +++ b/tests/testsuite/cargo_add/target_cfg/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn target_cfg() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs b/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs index 42713de86bd..8184dac8f0f 100644 --- a/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs +++ b/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn unknown_inherited_feature() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; diff --git a/tests/testsuite/cargo_add/vers/mod.rs b/tests/testsuite/cargo_add/vers/mod.rs index 140c6b93796..fb78739e9df 100644 --- a/tests/testsuite/cargo_add/vers/mod.rs +++ b/tests/testsuite/cargo_add/vers/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn vers() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/workspace_name/mod.rs b/tests/testsuite/cargo_add/workspace_name/mod.rs index 42d1a3f12ae..ccaf850f99c 100644 --- a/tests/testsuite/cargo_add/workspace_name/mod.rs +++ b/tests/testsuite/cargo_add/workspace_name/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn workspace_name() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/workspace_path/mod.rs b/tests/testsuite/cargo_add/workspace_path/mod.rs index f87d8243574..ab89e3a6da2 100644 --- a/tests/testsuite/cargo_add/workspace_path/mod.rs +++ b/tests/testsuite/cargo_add/workspace_path/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn workspace_path() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); diff --git a/tests/testsuite/cargo_add/workspace_path_dev/mod.rs b/tests/testsuite/cargo_add/workspace_path_dev/mod.rs index b3e2c5fc168..4ae04c70abb 100644 --- a/tests/testsuite/cargo_add/workspace_path_dev/mod.rs +++ b/tests/testsuite/cargo_add/workspace_path_dev/mod.rs @@ -6,7 +6,7 @@ use crate::cargo_add::init_registry; use cargo_test_support::curr_dir; #[cargo_test] -fn workspace_path_dev() { +fn case() { init_registry(); let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); From 41cd166887bb8672cfc3952bf2c19b43f003497c Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Mon, 20 Feb 2023 11:25:40 -0600 Subject: [PATCH 4/5] refactor: Rename test names to `case` for `init` --- tests/testsuite/init/auto_git/mod.rs | 2 +- tests/testsuite/init/bin_already_exists_explicit/mod.rs | 2 +- tests/testsuite/init/bin_already_exists_explicit_nosrc/mod.rs | 2 +- tests/testsuite/init/bin_already_exists_implicit/mod.rs | 2 +- .../testsuite/init/bin_already_exists_implicit_namenosrc/mod.rs | 2 +- tests/testsuite/init/bin_already_exists_implicit_namesrc/mod.rs | 2 +- tests/testsuite/init/bin_already_exists_implicit_nosrc/mod.rs | 2 +- tests/testsuite/init/both_lib_and_bin/mod.rs | 2 +- .../init/cant_create_library_when_both_binlib_present/mod.rs | 2 +- tests/testsuite/init/confused_by_multiple_lib_files/mod.rs | 2 +- .../init/creates_binary_when_both_binlib_present/mod.rs | 2 +- .../init/creates_binary_when_instructed_and_has_lib_file/mod.rs | 2 +- .../creates_library_when_instructed_and_has_bin_file/mod.rs | 2 +- tests/testsuite/init/explicit_bin_with_git/mod.rs | 2 +- tests/testsuite/init/formats_source/mod.rs | 2 +- tests/testsuite/init/fossil_autodetect/mod.rs | 2 +- tests/testsuite/init/git_autodetect/mod.rs | 2 +- .../init/git_ignore_exists_no_conflicting_entries/mod.rs | 2 +- tests/testsuite/init/ignores_failure_to_format_source/mod.rs | 2 +- tests/testsuite/init/inferred_bin_with_git/mod.rs | 2 +- tests/testsuite/init/inferred_lib_with_git/mod.rs | 2 +- tests/testsuite/init/invalid_dir_name/mod.rs | 2 +- tests/testsuite/init/lib_already_exists_nosrc/mod.rs | 2 +- tests/testsuite/init/lib_already_exists_src/mod.rs | 2 +- tests/testsuite/init/mercurial_autodetect/mod.rs | 2 +- tests/testsuite/init/multibin_project_name_clash/mod.rs | 2 +- tests/testsuite/init/no_filename/mod.rs | 2 +- tests/testsuite/init/path_contains_separator/mod.rs | 2 +- tests/testsuite/init/pijul_autodetect/mod.rs | 2 +- tests/testsuite/init/reserved_name/mod.rs | 2 +- tests/testsuite/init/simple_bin/mod.rs | 2 +- tests/testsuite/init/simple_git/mod.rs | 2 +- tests/testsuite/init/simple_git_ignore_exists/mod.rs | 2 +- tests/testsuite/init/simple_hg/mod.rs | 2 +- tests/testsuite/init/simple_hg_ignore_exists/mod.rs | 2 +- tests/testsuite/init/simple_lib/mod.rs | 2 +- tests/testsuite/init/unknown_flags/mod.rs | 2 +- tests/testsuite/init/with_argument/mod.rs | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/tests/testsuite/init/auto_git/mod.rs b/tests/testsuite/init/auto_git/mod.rs index 72a02b44fb5..68c21752065 100644 --- a/tests/testsuite/init/auto_git/mod.rs +++ b/tests/testsuite/init/auto_git/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn auto_git() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/bin_already_exists_explicit/mod.rs b/tests/testsuite/init/bin_already_exists_explicit/mod.rs index 47d2934a718..326bd218a6a 100644 --- a/tests/testsuite/init/bin_already_exists_explicit/mod.rs +++ b/tests/testsuite/init/bin_already_exists_explicit/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn bin_already_exists_explicit() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/bin_already_exists_explicit_nosrc/mod.rs b/tests/testsuite/init/bin_already_exists_explicit_nosrc/mod.rs index 3d5197f58a3..1f16fb659aa 100644 --- a/tests/testsuite/init/bin_already_exists_explicit_nosrc/mod.rs +++ b/tests/testsuite/init/bin_already_exists_explicit_nosrc/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn bin_already_exists_explicit_nosrc() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/bin_already_exists_implicit/mod.rs b/tests/testsuite/init/bin_already_exists_implicit/mod.rs index 01741fadc96..12349a09bdd 100644 --- a/tests/testsuite/init/bin_already_exists_implicit/mod.rs +++ b/tests/testsuite/init/bin_already_exists_implicit/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn bin_already_exists_implicit() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/bin_already_exists_implicit_namenosrc/mod.rs b/tests/testsuite/init/bin_already_exists_implicit_namenosrc/mod.rs index 31498176f52..fe65940dbdc 100644 --- a/tests/testsuite/init/bin_already_exists_implicit_namenosrc/mod.rs +++ b/tests/testsuite/init/bin_already_exists_implicit_namenosrc/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn bin_already_exists_implicit_namenosrc() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/bin_already_exists_implicit_namesrc/mod.rs b/tests/testsuite/init/bin_already_exists_implicit_namesrc/mod.rs index c0fea06b7d0..d3e8e66df7c 100644 --- a/tests/testsuite/init/bin_already_exists_implicit_namesrc/mod.rs +++ b/tests/testsuite/init/bin_already_exists_implicit_namesrc/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn bin_already_exists_implicit_namesrc() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/bin_already_exists_implicit_nosrc/mod.rs b/tests/testsuite/init/bin_already_exists_implicit_nosrc/mod.rs index 55f3484be6b..fe65940dbdc 100644 --- a/tests/testsuite/init/bin_already_exists_implicit_nosrc/mod.rs +++ b/tests/testsuite/init/bin_already_exists_implicit_nosrc/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn bin_already_exists_implicit_nosrc() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/both_lib_and_bin/mod.rs b/tests/testsuite/init/both_lib_and_bin/mod.rs index b4b51972361..c9232320a17 100644 --- a/tests/testsuite/init/both_lib_and_bin/mod.rs +++ b/tests/testsuite/init/both_lib_and_bin/mod.rs @@ -4,7 +4,7 @@ use cargo_test_support::prelude::*; use cargo_test_support::curr_dir; #[cargo_test] -fn both_lib_and_bin() { +fn case() { let cwd = paths::root(); snapbox::cmd::Command::cargo_ui() diff --git a/tests/testsuite/init/cant_create_library_when_both_binlib_present/mod.rs b/tests/testsuite/init/cant_create_library_when_both_binlib_present/mod.rs index 88eb72119d9..5e9e1b94c48 100644 --- a/tests/testsuite/init/cant_create_library_when_both_binlib_present/mod.rs +++ b/tests/testsuite/init/cant_create_library_when_both_binlib_present/mod.rs @@ -4,7 +4,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn cant_create_library_when_both_binlib_present() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/confused_by_multiple_lib_files/mod.rs b/tests/testsuite/init/confused_by_multiple_lib_files/mod.rs index eddf3af55f0..d1cba2ff71f 100644 --- a/tests/testsuite/init/confused_by_multiple_lib_files/mod.rs +++ b/tests/testsuite/init/confused_by_multiple_lib_files/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn confused_by_multiple_lib_files() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/creates_binary_when_both_binlib_present/mod.rs b/tests/testsuite/init/creates_binary_when_both_binlib_present/mod.rs index 7689e0b14ce..326bd218a6a 100644 --- a/tests/testsuite/init/creates_binary_when_both_binlib_present/mod.rs +++ b/tests/testsuite/init/creates_binary_when_both_binlib_present/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn creates_binary_when_both_binlib_present() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/creates_binary_when_instructed_and_has_lib_file/mod.rs b/tests/testsuite/init/creates_binary_when_instructed_and_has_lib_file/mod.rs index 50517f4ada3..326bd218a6a 100644 --- a/tests/testsuite/init/creates_binary_when_instructed_and_has_lib_file/mod.rs +++ b/tests/testsuite/init/creates_binary_when_instructed_and_has_lib_file/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn creates_binary_when_instructed_and_has_lib_file() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/creates_library_when_instructed_and_has_bin_file/mod.rs b/tests/testsuite/init/creates_library_when_instructed_and_has_bin_file/mod.rs index a207e234d24..59c192cb9ec 100644 --- a/tests/testsuite/init/creates_library_when_instructed_and_has_bin_file/mod.rs +++ b/tests/testsuite/init/creates_library_when_instructed_and_has_bin_file/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn creates_library_when_instructed_and_has_bin_file() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/explicit_bin_with_git/mod.rs b/tests/testsuite/init/explicit_bin_with_git/mod.rs index 10ba3364566..7314e955c03 100644 --- a/tests/testsuite/init/explicit_bin_with_git/mod.rs +++ b/tests/testsuite/init/explicit_bin_with_git/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn explicit_bin_with_git() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/formats_source/mod.rs b/tests/testsuite/init/formats_source/mod.rs index b8454beea9e..ac1fb627154 100644 --- a/tests/testsuite/init/formats_source/mod.rs +++ b/tests/testsuite/init/formats_source/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::{process, Project}; use cargo_test_support::curr_dir; #[cargo_test] -fn formats_source() { +fn case() { // This cannot use `requires_rustfmt` because rustfmt is not available in // the rust-lang/rust environment. Additionally, if running cargo without // rustup (but with rustup installed), this test also fails due to HOME diff --git a/tests/testsuite/init/fossil_autodetect/mod.rs b/tests/testsuite/init/fossil_autodetect/mod.rs index 87e3710b56b..d45ba868ad5 100644 --- a/tests/testsuite/init/fossil_autodetect/mod.rs +++ b/tests/testsuite/init/fossil_autodetect/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn fossil_autodetect() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/git_autodetect/mod.rs b/tests/testsuite/init/git_autodetect/mod.rs index 7ddf6200afd..aef47bc7db8 100644 --- a/tests/testsuite/init/git_autodetect/mod.rs +++ b/tests/testsuite/init/git_autodetect/mod.rs @@ -6,7 +6,7 @@ use std::fs; use cargo_test_support::curr_dir; #[cargo_test] -fn git_autodetect() { +fn case() { let project_root = &paths::root().join("foo"); // Need to create `.git` dir manually because it cannot be tracked under a git repo fs::create_dir_all(project_root.join(".git")).unwrap(); diff --git a/tests/testsuite/init/git_ignore_exists_no_conflicting_entries/mod.rs b/tests/testsuite/init/git_ignore_exists_no_conflicting_entries/mod.rs index ed037a0dab2..cd4437c6537 100644 --- a/tests/testsuite/init/git_ignore_exists_no_conflicting_entries/mod.rs +++ b/tests/testsuite/init/git_ignore_exists_no_conflicting_entries/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn git_ignore_exists_no_conflicting_entries() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/ignores_failure_to_format_source/mod.rs b/tests/testsuite/init/ignores_failure_to_format_source/mod.rs index b27abe6da5e..fd9394049fc 100644 --- a/tests/testsuite/init/ignores_failure_to_format_source/mod.rs +++ b/tests/testsuite/init/ignores_failure_to_format_source/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn ignores_failure_to_format_source() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/inferred_bin_with_git/mod.rs b/tests/testsuite/init/inferred_bin_with_git/mod.rs index 73ae1ce5624..80bec8893cc 100644 --- a/tests/testsuite/init/inferred_bin_with_git/mod.rs +++ b/tests/testsuite/init/inferred_bin_with_git/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn inferred_bin_with_git() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/inferred_lib_with_git/mod.rs b/tests/testsuite/init/inferred_lib_with_git/mod.rs index 8abeba5b376..80bec8893cc 100644 --- a/tests/testsuite/init/inferred_lib_with_git/mod.rs +++ b/tests/testsuite/init/inferred_lib_with_git/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn inferred_lib_with_git() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/invalid_dir_name/mod.rs b/tests/testsuite/init/invalid_dir_name/mod.rs index ca65a7c39f9..2b1be9022b0 100644 --- a/tests/testsuite/init/invalid_dir_name/mod.rs +++ b/tests/testsuite/init/invalid_dir_name/mod.rs @@ -5,7 +5,7 @@ use std::fs; use cargo_test_support::curr_dir; #[cargo_test] -fn invalid_dir_name() { +fn case() { let foo = &paths::root().join("foo.bar"); fs::create_dir_all(foo).unwrap(); diff --git a/tests/testsuite/init/lib_already_exists_nosrc/mod.rs b/tests/testsuite/init/lib_already_exists_nosrc/mod.rs index 7df85238b0e..d3e8e66df7c 100644 --- a/tests/testsuite/init/lib_already_exists_nosrc/mod.rs +++ b/tests/testsuite/init/lib_already_exists_nosrc/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn lib_already_exists_nosrc() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/lib_already_exists_src/mod.rs b/tests/testsuite/init/lib_already_exists_src/mod.rs index 3b53798349d..d3e8e66df7c 100644 --- a/tests/testsuite/init/lib_already_exists_src/mod.rs +++ b/tests/testsuite/init/lib_already_exists_src/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn lib_already_exists_src() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/mercurial_autodetect/mod.rs b/tests/testsuite/init/mercurial_autodetect/mod.rs index a3e334fc361..d45ba868ad5 100644 --- a/tests/testsuite/init/mercurial_autodetect/mod.rs +++ b/tests/testsuite/init/mercurial_autodetect/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn mercurial_autodetect() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/multibin_project_name_clash/mod.rs b/tests/testsuite/init/multibin_project_name_clash/mod.rs index f98f2337466..fdd4476d93b 100644 --- a/tests/testsuite/init/multibin_project_name_clash/mod.rs +++ b/tests/testsuite/init/multibin_project_name_clash/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn multibin_project_name_clash() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/no_filename/mod.rs b/tests/testsuite/init/no_filename/mod.rs index d608586aaf5..8edfd282316 100644 --- a/tests/testsuite/init/no_filename/mod.rs +++ b/tests/testsuite/init/no_filename/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::curr_dir; #[cfg(not(windows))] #[cargo_test] -fn no_filename() { +fn case() { snapbox::cmd::Command::cargo_ui() .arg_line("init /") .current_dir(paths::root()) diff --git a/tests/testsuite/init/path_contains_separator/mod.rs b/tests/testsuite/init/path_contains_separator/mod.rs index 033836ab13c..0a12f4269d2 100644 --- a/tests/testsuite/init/path_contains_separator/mod.rs +++ b/tests/testsuite/init/path_contains_separator/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::{t, Project}; use cargo_test_support::curr_dir; #[cargo_test] -fn path_contains_separator() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root().join("test:ing"); diff --git a/tests/testsuite/init/pijul_autodetect/mod.rs b/tests/testsuite/init/pijul_autodetect/mod.rs index 472f240b2a0..d45ba868ad5 100644 --- a/tests/testsuite/init/pijul_autodetect/mod.rs +++ b/tests/testsuite/init/pijul_autodetect/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn pijul_autodetect() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/reserved_name/mod.rs b/tests/testsuite/init/reserved_name/mod.rs index 3be1d04bf14..cc65fd0a183 100644 --- a/tests/testsuite/init/reserved_name/mod.rs +++ b/tests/testsuite/init/reserved_name/mod.rs @@ -5,7 +5,7 @@ use std::fs; use cargo_test_support::curr_dir; #[cargo_test] -fn reserved_name() { +fn case() { let project_root = &paths::root().join("test"); fs::create_dir_all(project_root).unwrap(); diff --git a/tests/testsuite/init/simple_bin/mod.rs b/tests/testsuite/init/simple_bin/mod.rs index 63e0982bc25..eaf0955f9f8 100644 --- a/tests/testsuite/init/simple_bin/mod.rs +++ b/tests/testsuite/init/simple_bin/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn simple_bin() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/simple_git/mod.rs b/tests/testsuite/init/simple_git/mod.rs index 1f55373f98b..c373fe2a2c6 100644 --- a/tests/testsuite/init/simple_git/mod.rs +++ b/tests/testsuite/init/simple_git/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn simple_git() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/simple_git_ignore_exists/mod.rs b/tests/testsuite/init/simple_git_ignore_exists/mod.rs index 2876b6989cd..142e86efdc0 100644 --- a/tests/testsuite/init/simple_git_ignore_exists/mod.rs +++ b/tests/testsuite/init/simple_git_ignore_exists/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn simple_git_ignore_exists() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/simple_hg/mod.rs b/tests/testsuite/init/simple_hg/mod.rs index 3aad971bfb2..1d676545304 100644 --- a/tests/testsuite/init/simple_hg/mod.rs +++ b/tests/testsuite/init/simple_hg/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test(requires_hg)] -fn simple_hg() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/simple_hg_ignore_exists/mod.rs b/tests/testsuite/init/simple_hg_ignore_exists/mod.rs index cb934b73600..d45ba868ad5 100644 --- a/tests/testsuite/init/simple_hg_ignore_exists/mod.rs +++ b/tests/testsuite/init/simple_hg_ignore_exists/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn simple_hg_ignore_exists() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/simple_lib/mod.rs b/tests/testsuite/init/simple_lib/mod.rs index d46140e819f..d6bae51672a 100644 --- a/tests/testsuite/init/simple_lib/mod.rs +++ b/tests/testsuite/init/simple_lib/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn simple_lib() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); diff --git a/tests/testsuite/init/unknown_flags/mod.rs b/tests/testsuite/init/unknown_flags/mod.rs index 91037821e94..4289b4b9ec9 100644 --- a/tests/testsuite/init/unknown_flags/mod.rs +++ b/tests/testsuite/init/unknown_flags/mod.rs @@ -4,7 +4,7 @@ use cargo_test_support::prelude::*; use cargo_test_support::curr_dir; #[cargo_test] -fn unknown_flags() { +fn case() { snapbox::cmd::Command::cargo_ui() .arg_line("init foo --flag") .current_dir(paths::root()) diff --git a/tests/testsuite/init/with_argument/mod.rs b/tests/testsuite/init/with_argument/mod.rs index 7d1b20e5e67..0b5e342a138 100644 --- a/tests/testsuite/init/with_argument/mod.rs +++ b/tests/testsuite/init/with_argument/mod.rs @@ -5,7 +5,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn with_argument() { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = &project.root(); From 822b2579464f5692c269dd49fef41b7a150fe5e2 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Mon, 20 Feb 2023 11:30:22 -0600 Subject: [PATCH 5/5] chore: Update docs for writing UI tests to use `case` for the test function name --- src/doc/contrib/src/tests/writing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/contrib/src/tests/writing.md b/src/doc/contrib/src/tests/writing.md index b08d8b92541..a84dd5d6a41 100644 --- a/src/doc/contrib/src/tests/writing.md +++ b/src/doc/contrib/src/tests/writing.md @@ -171,7 +171,7 @@ use cargo_test_support::Project; use cargo_test_support::curr_dir; #[cargo_test] -fn () { +fn case() { let project = Project::from_template(curr_dir!().join("in")); let project_root = project.root(); let cwd = &project_root;