Commit d1d16f2
committed
Auto merge of #11745 - Muscraft:cleanup-tests, r=epage
Cleanup tests
When working on #11738 I noticed a few tests that needed to be cleaned up. It [was suggested](#11738 (comment)) to split the test changes into their own PR.
- `bad_config::bad1`
- This was trying to match `config` which would get matched in the wrong place due to the test name having `config` in it
- Fixed by making the match `/config`
- `build_script::panic_abort_with_build_scripts`
- This test was failing as it was making sure `panic` was not in the output. After this change, it could match the test name and fail.
- To fix this I updated it to look at `panic=abort` which appears to be what it was originally looking for (#5711). `@ehuss` please let me know if I misread what the test was testing.
- `cargo_command::cargo_subcommand_args`
- This test had `#[test]` above `#[cargo_test]` which caused it to throw an error removing it fixed the issue
During this time I also ran into issues with `cargo_remove` tests being named `fn case()` which is different from how tests are normally named. I talked with `@epage` and it was decided that `fn case()` should probably be used for all `snapbox` tests since the unique test name is already the folder name. I went ahead and renamed all tests within `cargo_add/` and `init/` to match this style.
This PR should be reviewed commit by commit.File tree
152 files changed
+151
-152
lines changed- src/doc/contrib/src/tests
- tests/testsuite
- cargo_add
- add_basic
- add_multiple
- add_normalized_name_external
- build_prefer_existing_version
- build
- change_rename_target
- default_features
- deprecated_default_features
- deprecated_section
- detect_workspace_inherit_features
- detect_workspace_inherit_optional
- detect_workspace_inherit
- dev_build_conflict
- dev_prefer_existing_version
- dev
- dry_run
- features_empty
- features_multiple_occurrences
- features_preserve
- features_spaced_values
- features_unknown_no_features
- features_unknown
- features
- git_branch
- git_conflicts_namever
- git_dev
- git_inferred_name_multiple
- git_inferred_name
- git_multiple_names
- git_normalized_name
- git_registry
- git_rev
- git_tag
- git
- infer_prerelease
- invalid_arg
- invalid_git_external
- invalid_git_name
- invalid_key_inherit_dependency
- invalid_key_overwrite_inherit_dependency
- invalid_key_rename_inherit_dependency
- invalid_manifest
- invalid_name_external
- invalid_path_name
- invalid_path_self
- invalid_path
- invalid_target_empty
- invalid_vers
- list_features_path_no_default
- list_features_path
- list_features
- locked_changed
- locked_unchanged
- lockfile_updated
- manifest_path_package
- merge_activated_features
- multiple_conflicts_with_features
- multiple_conflicts_with_rename
- namever
- no_args
- no_default_features
- no_optional
- offline_empty_cache
- optional
- overwrite_default_features_with_no_default_features
- overwrite_default_features
- overwrite_features
- overwrite_git_with_path
- overwrite_inherit_features_noop
- overwrite_inherit_noop
- overwrite_inherit_optional_noop
- overwrite_inline_features
- overwrite_name_dev_noop
- overwrite_name_noop
- overwrite_no_default_features_with_default_features
- overwrite_no_default_features
- overwrite_no_optional_with_optional
- overwrite_no_optional
- overwrite_optional_with_no_optional
- overwrite_optional
- overwrite_path_noop
- overwrite_path_with_version
- overwrite_preserves_inline_table
- overwrite_rename_with_no_rename
- overwrite_rename_with_rename_noop
- overwrite_rename_with_rename
- overwrite_version_with_git
- overwrite_version_with_path
- overwrite_with_rename
- overwrite_workspace_dep_features
- overwrite_workspace_dep
- path_dev
- path_inferred_name_conflicts_full_feature
- path_inferred_name
- path_normalized_name
- path
- preserve_sorted
- preserve_unsorted
- quiet
- registry
- rename
- require_weak
- sorted_table_with_dotted_item
- target_cfg
- target
- unknown_inherited_feature
- vers
- workspace_name
- workspace_path_dev
- workspace_path
- init
- auto_git
- bin_already_exists_explicit_nosrc
- bin_already_exists_explicit
- bin_already_exists_implicit_namenosrc
- bin_already_exists_implicit_namesrc
- bin_already_exists_implicit_nosrc
- bin_already_exists_implicit
- both_lib_and_bin
- cant_create_library_when_both_binlib_present
- confused_by_multiple_lib_files
- creates_binary_when_both_binlib_present
- creates_binary_when_instructed_and_has_lib_file
- creates_library_when_instructed_and_has_bin_file
- explicit_bin_with_git
- formats_source
- fossil_autodetect
- git_autodetect
- git_ignore_exists_no_conflicting_entries
- ignores_failure_to_format_source
- inferred_bin_with_git
- inferred_lib_with_git
- invalid_dir_name
- lib_already_exists_nosrc
- lib_already_exists_src
- mercurial_autodetect
- multibin_project_name_clash
- no_filename
- path_contains_separator
- pijul_autodetect
- reserved_name
- simple_bin
- simple_git_ignore_exists
- simple_git
- simple_hg_ignore_exists
- simple_hg
- simple_lib
- unknown_flags
- with_argument
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
152 files changed
+151
-152
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3707 | 3707 | | |
3708 | 3708 | | |
3709 | 3709 | | |
3710 | | - | |
| 3710 | + | |
3711 | 3711 | | |
3712 | 3712 | | |
3713 | 3713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments