cargo/tests/testsuite
bors 4b681c7338 Auto merge of #13980 - epage:compare, r=hi-rustin
refactor: Transition direct assertions from cargo-test-support to snapbox

### What does this PR try to resolve?

Cargo has a bespoke testing framework for functional tests
- Extra stuff for us to maintain
- Don't leverage benefits from contributions related to other projects
- Less incentive to be thoroughly documented

UI tests are written using snapbox.  The latest release of snapbox (#13963) was geared at supporting cargo's needs in the hope that we can consolidate on testing frameworks.

Besides having a single set of semantics, benefits we'd gain include
- Updating of test snapshots
- Fancier redacting of test output (e.g. #13973)

This is the first incremental step in this direction.  This replaces direct assertions with snapbox assertions.  This still leaves all of the CLI output assertions. These will be done incrementally.

### How should we test and review this PR?

### Additional information
2024-06-02 14:48:01 +00:00
..
cargo Revert "fix(context): Configure Shell before emitting messages" 2024-05-31 14:56:18 -05:00
cargo_add refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_bench refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_build refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_check refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_clean refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_config refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_doc refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_fetch refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_fix refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_generate_lockfile refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_git_checkout refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_help refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_init refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_install refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_locate_project refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_login refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_logout refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_metadata refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_new fix(new): Dont say were adding to a workspace when a regular package is in root 2024-05-30 13:27:12 -05:00
cargo_owner refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_package refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_pkgid refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_publish refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_read_manifest refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_remove refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_report refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_run refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_rustc refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_rustdoc refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_search refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_test refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_tree refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_uninstall refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_update refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_vendor refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_verify_project refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_version refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
cargo_yank refactor: Resolve deprecations 2024-05-27 21:27:03 -05:00
lints feat(test): Auto-redact elapsed time 2024-05-27 21:27:25 -05:00
mock-std
advanced_env.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
alt_registry.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
artifact_dep.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
bad_config.rs fix(toml): Validate crates_types/proc-macro for bin like others 2024-05-01 19:36:30 -05:00
bad_manifest_path.rs
bench.rs Update benchmark formatting for new nightly 2024-05-11 08:19:03 -04:00
binary_name.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
build.rs refactor: Port from matches_unordered to assert_e2e 2024-05-29 14:08:10 -05:00
build_plan.rs
build_script.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
build_script_env.rs Update other tests to use cargo:: syntax 2023-12-23 13:17:55 +08:00
build_script_extra_link_arg.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
cache_lock.rs chore: Rename Config to GlobalContext 2024-02-20 11:55:15 -07:00
cache_messages.rs fix(rustc): Always pass --edition to rustc 2024-02-28 15:35:41 -06:00
cargo_alias_config.rs fix(alias): Aliases without subcommands should not panic 2024-04-30 09:30:22 +08:00
cargo_command.rs fix(cli): Suggest cargo-search on bad commands 2023-10-17 14:46:30 -05:00
cargo_env_config.rs Also wrap the initial -vV invocation in the rustc_(workspace_)wrapper 2024-04-12 12:33:34 +02:00
cargo_features.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
cargo_targets.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
cfg.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
check.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
check_cfg.rs Include lints.rust.unexpected_cfgs.check-cfg into the fingerprint 2024-05-28 20:02:47 +02:00
clean.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
collisions.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
concurrent.rs fix(compiler): Clarify we're showing a profile name 2024-02-08 14:01:39 -06:00
config.rs Auto merge of #13980 - epage:compare, r=hi-rustin 2024-06-02 14:48:01 +00:00
config_cli.rs Revert "fix(context): Configure Shell before emitting messages" 2024-05-31 14:56:18 -05:00
config_include.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
corrupt_git.rs
credential_process.rs fix(credential): trim newlines in token from stdin for credential providers 2024-04-17 17:39:46 -05:00
cross_compile.rs test: Move off of deprecated manifest fields 2024-04-18 14:11:31 -05:00
cross_publish.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
custom_target.rs test: Make edition explicit on packages 2024-02-29 15:48:41 -06:00
death.rs test: Remove add/remove death tests 2024-04-12 16:06:15 -05:00
dep_info.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
diagnostics.rs fix(toml): Improve map/sequence error message 2024-01-31 10:42:58 -06:00
direct_minimal_versions.rs test(resolve): Show minimal version output 2024-04-13 20:37:55 -05:00
directory.rs feat(install): Including Locking message 2024-04-16 13:35:25 -05:00
doc.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
docscrape.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
edition.rs fix(toml): Don't warn on unset Edition if only 2015 is compatible 2024-03-04 16:27:11 -06:00
error.rs
features.rs test(toml): Centralize underscore field tests 2024-04-18 14:38:05 -05:00
features2.rs fix(toml): Warn, rather than fail publish, if targets are excluded 2024-04-29 12:25:56 -05:00
features_namespaced.rs Update regular tests for always-on check-cfg 2024-05-01 12:56:04 +02:00
fetch.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
fix.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
fix_n_times.rs cargo fix: Call rustc fewer times. 2024-01-02 15:03:06 -08:00
freshness.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
future_incompat_report.rs Update future-incompat output test for latest nightly. 2024-02-15 09:36:40 -08:00
generate_lockfile.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
git.rs Make git::use_the_cli test truly locale independent 2024-05-19 19:39:34 +02:00
git_auth.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
git_gc.rs
git_shallow.rs Implementation of shallow libgit2 fetches behind an unstable flag 2024-01-11 17:08:21 +09:00
glob_targets.rs fix(rustc): Always pass --edition to rustc 2024-02-28 15:35:41 -06:00
global_cache_tracker.rs Fix global_cache_tracker::max_download_size test flakiness 2024-05-04 12:25:16 -07:00
help.rs test(config): Shift to config.toml 2024-01-26 13:40:46 -06:00
https.rs fix: adjust custom err from cert-check due to libgit2 1.8 change 2024-05-31 00:39:30 -04:00
inheritable_workspace_fields.rs fix(toml): Disallow ignored default-features when inheriting 2024-05-01 12:04:07 -05:00
install.rs refactor: Port from matches_contains to assert_e2e 2024-05-29 14:08:10 -05:00
install_upgrade.rs fix(compiler): Clarify we're showing a profile name 2024-02-08 14:01:39 -06:00
jobserver.rs feat: inherit jobserver from env for all kinds of runner 2024-01-19 18:36:35 -05:00
lints_table.rs Allow lint config to have extra custom configs 2024-05-16 17:03:42 +02:00
list_availables.rs fix(cli): Clarify --test is for targets, not test functions 2023-11-03 15:45:00 -05:00
local_registry.rs feat(update): Include a Locking message 2024-04-15 12:36:36 -05:00
locate_project.rs
lockfile_compat.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
login.rs fix(credential): trim newlines in token from stdin for credential providers 2024-04-17 17:39:46 -05:00
logout.rs
lto.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
main.rs feat: Add a basic linting system 2024-03-23 10:26:02 -06:00
member_discovery.rs refactor(context): Rename config mod to context 2024-02-29 16:08:08 -06:00
member_errors.rs refactor(context): Rename config mod to context 2024-02-29 16:08:08 -06:00
message_format.rs
messages.rs Change tests to support changes to suggestion 2024-02-01 03:47:27 +00:00
metabuild.rs test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
metadata.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
minimal_versions.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
multitarget.rs fix(compiler): Clarify we're showing a profile name 2024-02-08 14:01:39 -06:00
net_config.rs test(config): Shift to config.toml 2024-01-26 13:40:46 -06:00
new.rs Use u64 rather than usize as "default integer" in library template 2024-05-22 16:11:00 +02:00
offline.rs fix(update): Remove locking message for --precise 2024-04-15 13:00:34 -05:00
old_cargos.rs Fix old_cargos tests 2024-02-12 10:41:34 -08:00
open_namespaces.rs feat(toml): Add support for open namespaces 2024-03-15 12:54:05 -05:00
out_dir.rs test(config): Shift to config.toml 2024-01-26 13:40:46 -06:00
owner.rs
package.rs fix(toml): Warn, rather than fail publish, if targets are excluded 2024-04-29 12:25:56 -05:00
package_features.rs Update regular tests for always-on check-cfg 2024-05-01 12:56:04 +02:00
patch.rs fix: Make path dependencies with the same name stays locked 2024-05-18 12:45:11 -07:00
path.rs fix: Make path dependencies with the same name stays locked 2024-05-18 12:45:11 -07:00
paths.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
pkgid.rs refactor: Port from assert_matches_exact to assert_e2e 2024-05-29 14:08:10 -05:00
precise_pre_release.rs fix(update): Remove locking message for --precise 2024-04-15 13:00:34 -05:00
proc_macro.rs test(toml): Centralize underscore field tests 2024-04-18 14:38:05 -05:00
profile_config.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
profile_custom.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
profile_overrides.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
profile_targets.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
profile_trim_paths.rs refactor: Port from matches_contains to assert_e2e 2024-05-29 14:08:10 -05:00
profiles.rs Update regular tests for always-on check-cfg 2024-05-01 12:56:04 +02:00
progress.rs fix: Add more context when 'missing feild' 2024-05-24 11:29:46 +08:00
pub_priv.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
publish.rs fix(toml): Warn, rather than fail publish, if targets are excluded 2024-04-29 12:25:56 -05:00
publish_lockfile.rs feat(install): Including Locking message 2024-04-16 13:35:25 -05:00
read_manifest.rs refactor(metadata): Switch opaque ID from PackageID to PackageIDSpec 2023-12-06 08:58:56 -06:00
registry.rs fix(update): Remove locking message for --precise 2024-04-15 13:00:34 -05:00
registry_auth.rs refactor: Port from matches_contains to assert_e2e 2024-05-29 14:08:10 -05:00
rename_deps.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
replace.rs feat(update): Include a Locking message 2024-04-15 12:36:36 -05:00
required_features.rs feat(install): Including Locking message 2024-04-16 13:35:25 -05:00
run.rs test: Move off of deprecated manifest fields 2024-04-18 14:11:31 -05:00
rust_version.rs fix(install): Don't respect MSRV for non-local installs 2024-04-23 14:17:10 -05:00
rustc.rs Update regular tests for always-on check-cfg 2024-05-01 12:56:04 +02:00
rustc_info_cache.rs
rustdoc.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
rustdoc_extern_html.rs fix(rustdoc-map): dedup --extern-html-too-url for same unit 2024-03-05 20:08:29 -05:00
rustdocflags.rs test: target.triple.rustdocflags works for doctest 2024-02-20 19:15:53 -05:00
rustflags.rs Update regular tests for always-on check-cfg 2024-05-01 12:56:04 +02:00
rustup.rs
script.rs fix(toml): Remove dashed and hashed frontmatter syntax 2024-05-04 23:11:19 +02:00
search.rs chore: Rename Config to GlobalContext 2024-02-20 11:55:15 -07:00
shell_quoting.rs
source_replacement.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
ssh.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
standard_lib.rs Temporarily fix standard_lib tests on linux. 2024-05-18 14:00:06 -07:00
test.rs Use u64 rather than usize as "default integer" in library template 2024-05-22 16:11:00 +02:00
timings.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
tool_paths.rs fix(compiler): Clarify we're showing a profile name 2024-02-08 14:01:39 -06:00
tree.rs
tree_graph_features.rs
unit_graph.rs Update existing tests 2024-01-07 09:48:02 +01:00
update.rs feat: stabilize cargo update --precise <yanked> 2024-05-28 13:13:56 -04:00
vendor.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
verify_project.rs
version.rs test(config): Shift to config.toml 2024-01-26 13:40:46 -06:00
warn_on_failure.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
weak_dep_features.rs Update regular tests for always-on check-cfg 2024-05-01 12:56:04 +02:00
workspaces.rs feat(resolve): Tell the user the style of resovle done 2024-04-13 20:39:59 -05:00
yank.rs