tests: Update for snapbox deprecations

This commit is contained in:
Ed Page 2024-07-23 12:35:43 -05:00
parent 7c8411cef8
commit bb5488c9a0
17 changed files with 68 additions and 68 deletions

View File

@ -989,7 +989,7 @@ fn alt_reg_metadata() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
@ -1353,7 +1353,7 @@ fn alt_reg_metadata() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -1615,7 +1615,7 @@ fn unknown_registry() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}

View File

@ -334,7 +334,7 @@ fn verify_project_dir_containing_cargo_toml() {
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
"#]]
.json_lines(),
.is_jsonlines(),
)
.run();
}
@ -354,7 +354,7 @@ fn verify_project_dir_plus_file() {
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
"#]]
.json_lines(),
.is_jsonlines(),
)
.run();
}
@ -374,7 +374,7 @@ fn verify_project_dir_plus_path() {
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
"#]]
.json_lines(),
.is_jsonlines(),
)
.run();
}
@ -390,7 +390,7 @@ fn verify_project_dir_to_nonexistent_cargo_toml() {
{"invalid":"manifest path `foo/bar/baz/Cargo.toml` does not exist"}
"#]]
.json_lines(),
.is_jsonlines(),
)
.run();
}

View File

@ -2116,7 +2116,7 @@ fn json_artifact_includes_executable_for_benchmark() {
{"reason":"build-finished","success":true}
"#]]
.json_lines(),
.is_jsonlines(),
)
.run();
}

View File

@ -319,6 +319,6 @@ fn check_msg_format_json() {
{"executable":"[ROOT]/foo/target/debug/007bar[EXE]","features":[],"filenames":"{...}","fresh":false,"manifest_path":"[ROOT]/foo/Cargo.toml","package_id":"path+[ROOTURL]/foo#0.0.1","profile":"{...}","reason":"compiler-artifact","target":"{...}"}
{"reason":"build-finished","success":true}
"#]].json_lines())
"#]].is_jsonlines())
.run();
}

View File

@ -39,7 +39,7 @@ fn cargo_build_plan_simple() {
]
}
"#]]
.json(),
.is_json(),
)
.run();
assert!(!p.bin("foo").is_file());
@ -126,7 +126,7 @@ fn cargo_build_plan_single_dep() {
]
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -213,7 +213,7 @@ fn cargo_build_plan_build_script() {
]
}
"#]]
.json(),
.is_json(),
)
.run();
}

View File

@ -217,7 +217,7 @@ fn get_json() {
}
"#
.json(),
.is_json(),
)
.with_stderr_data(str![[r#"
[NOTE] The following environment variables may affect the loaded values.
@ -270,7 +270,7 @@ CARGO_HOME=[ROOT]/home/.cargo
}
"#
.json(),
.is_json(),
)
.with_stderr_data(str![[r#"
[NOTE] The following environment variables may affect the loaded values.

View File

@ -640,7 +640,7 @@ fn json_exposed() {
}
"#]]
.json(),
.is_json(),
)
.run();
}

View File

@ -3656,7 +3656,7 @@ fn metadata_master_consistency() {
let bar_source = "git+[ROOTURL]/bar?branch=master";
p.cargo("metadata")
.with_stdout_data(&metadata(&bar_source).json())
.with_stdout_data(&metadata(&bar_source).is_json())
.run();
// Conversely, remove branch="master" from Cargo.toml, but use a new Cargo.lock that has ?branch=master.
@ -3702,7 +3702,7 @@ fn metadata_master_consistency() {
// No ?branch=master!
let bar_source = "git+[ROOTURL]/bar";
p.cargo("metadata")
.with_stdout_data(&metadata(&bar_source).json())
.with_stdout_data(&metadata(&bar_source).is_json())
.run();
}

View File

@ -15,7 +15,7 @@ fn simple() {
"root": "[ROOT]/foo/Cargo.toml"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -38,7 +38,7 @@ fn message_format() {
"root": "[ROOT]/foo/Cargo.toml"
}
"#]]
.json(),
.is_json(),
)
.run();
@ -84,7 +84,7 @@ fn workspace() {
"root": "[ROOT]/foo/Cargo.toml"
}
"#]]
.json(),
.is_json(),
)
.run();
@ -96,7 +96,7 @@ fn workspace() {
"root": "[ROOT]/foo/inner/Cargo.toml"
}
"#]]
.json(),
.is_json(),
)
.run();
@ -107,7 +107,7 @@ fn workspace() {
"root": "[ROOT]/foo/Cargo.toml"
}
"#]]
.json(),
.is_json(),
)
.run();
@ -119,7 +119,7 @@ fn workspace() {
"root": "[ROOT]/foo/Cargo.toml"
}
"#]]
.json(),
.is_json(),
)
.run();
}

View File

@ -586,7 +586,7 @@ fn metabuild_build_plan() {
]
}
"#]]
.json(),
.is_json(),
)
.run();

View File

@ -87,7 +87,7 @@ fn cargo_metadata_simple() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -200,7 +200,7 @@ crate-type = ["lib", "staticlib"]
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -303,7 +303,7 @@ optional_feat = []
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -622,7 +622,7 @@ fn cargo_metadata_with_deps_and_version() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -729,7 +729,7 @@ name = "ex"
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -838,7 +838,7 @@ crate-type = ["rlib", "dylib"]
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -1000,7 +1000,7 @@ fn workspace_metadata() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -1224,7 +1224,7 @@ fn workspace_metadata_with_dependencies_no_deps() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -1860,7 +1860,7 @@ fn workspace_metadata_with_dependencies_and_resolve() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2094,7 +2094,7 @@ fn cargo_metadata_no_deps_path_to_cargo_toml_relative() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2170,7 +2170,7 @@ fn cargo_metadata_no_deps_path_to_cargo_toml_absolute() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2279,7 +2279,7 @@ fn cargo_metadata_no_deps_cwd() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2419,7 +2419,7 @@ fn package_metadata() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2513,7 +2513,7 @@ fn package_publish() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2610,7 +2610,7 @@ fn cargo_metadata_path_to_cargo_toml_project() {
"workspace_root": "[ROOT]/foo/target/package/bar-0.5.0"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2702,7 +2702,7 @@ fn package_edition_2018() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -2854,7 +2854,7 @@ fn target_edition_2018() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -3094,7 +3094,7 @@ fn rename_dependency() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -3199,7 +3199,7 @@ fn metadata_links() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run()
}
@ -3306,7 +3306,7 @@ fn deps_with_bin_only() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -4149,7 +4149,7 @@ fn dep_kinds() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -4268,7 +4268,7 @@ fn dep_kinds_workspace() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -4536,7 +4536,7 @@ fn workspace_metadata_with_dependencies_no_deps_artifact() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -4819,7 +4819,7 @@ fn versionless_packages() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -4929,7 +4929,7 @@ local-time = 1979-05-27
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();
}

View File

@ -98,7 +98,7 @@ fn implicit_lib_within_namespace() {
"version": "0.0.1"
}
"#]]
.json(),
.is_json(),
)
.with_stderr_data("")
.run()
@ -167,7 +167,7 @@ fn implicit_bin_within_namespace() {
"version": "0.0.1"
}
"#]]
.json(),
.is_json(),
)
.with_stderr_data("")
.run()
@ -254,7 +254,7 @@ fn explicit_bin_within_namespace() {
"version": "0.0.1"
}
"#]]
.json(),
.is_json(),
)
.with_stderr_data("")
.run()
@ -322,7 +322,7 @@ fn main() {}
"version": "0.0.0"
}
"#]]
.json(),
.is_json(),
)
.with_stderr_data("")
.run();

View File

@ -426,7 +426,7 @@ fn pkgid_json_message_metadata_consistency() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run()
}

View File

@ -37,7 +37,7 @@ fn cargo_read_manifest_path_to_cargo_toml_relative() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -59,7 +59,7 @@ fn cargo_read_manifest_path_to_cargo_toml_absolute() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -114,7 +114,7 @@ fn cargo_read_manifest_cwd() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -138,7 +138,7 @@ fn cargo_read_manifest_with_specified_readme() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -163,7 +163,7 @@ fn cargo_read_manifest_default_readme() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
);
assert_output(
@ -174,7 +174,7 @@ fn cargo_read_manifest_default_readme() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
);
assert_output(
@ -185,7 +185,7 @@ fn cargo_read_manifest_default_readme() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
);
}
@ -208,7 +208,7 @@ fn cargo_read_manifest_suppress_default_readme() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
)
.run();
}
@ -230,7 +230,7 @@ fn cargo_read_manifest_defaults_readme_if_true() {
"...": "{...}"
}
"#]]
.json(),
.is_json(),
)
.run();
}

View File

@ -1115,7 +1115,7 @@ fn cmd_metadata_with_embedded() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.with_stderr_data(str![[r#"
[WARNING] `package.edition` is unspecified, defaulting to `2021`
@ -1177,7 +1177,7 @@ fn cmd_read_manifest_with_embedded() {
"version": "0.0.0"
}
"#]]
.json(),
.is_json(),
)
.with_stderr_data(str![[r#"
[WARNING] `package.edition` is unspecified, defaulting to `2021`
@ -1258,7 +1258,7 @@ fn cmd_verify_project_with_embedded() {
"success": "true"
}
"#]]
.json(),
.is_json(),
)
.with_stderr_data(str![[r#"
[WARNING] `package.edition` is unspecified, defaulting to `2021`

View File

@ -230,7 +230,7 @@ fn simple() {
"version": 1
}
"#]]
.json(),
.is_json(),
)
.run();
}

View File

@ -838,7 +838,7 @@ fn update_precise_first_run() {
"workspace_root": "[ROOT]/foo"
}
"#]]
.json(),
.is_json(),
)
.run();