fix(test): Deprecate non-snapbox assertions

While this is noisy and hides other deprecations, I figured deprecations would
make it easier for people to discover what tasks remain and allow us to
divide and conquer this work rather than doing a heroic PR.
In theory, this will be short lived and we'll go back to seeing
deprecations in our tests.
This commit is contained in:
Ed Page 2024-06-07 14:55:21 -05:00
parent ff2ddebc71
commit dc5ac62cab
146 changed files with 301 additions and 0 deletions

View File

@ -559,6 +559,7 @@ impl Execs {
/// Verifies that stdout is equal to the given lines.
/// See [`compare`] for supported patterns.
#[deprecated(note = "replaced with `Execs::with_stdout_data(expected)`")]
pub fn with_stdout<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stdout = Some(expected.to_string());
self
@ -566,6 +567,7 @@ impl Execs {
/// Verifies that stderr is equal to the given lines.
/// See [`compare`] for supported patterns.
#[deprecated(note = "replaced with `Execs::with_stderr_data(expected)`")]
pub fn with_stderr<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stderr = Some(expected.to_string());
self
@ -613,6 +615,7 @@ impl Execs {
/// its output.
///
/// See [`compare`] for supported patterns.
#[deprecated(note = "replaced with `Execs::with_stdout_data(expected)`")]
pub fn with_stdout_contains<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stdout_contains.push(expected.to_string());
self
@ -622,6 +625,7 @@ impl Execs {
/// its output.
///
/// See [`compare`] for supported patterns.
#[deprecated(note = "replaced with `Execs::with_stderr_data(expected)`")]
pub fn with_stderr_contains<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stderr_contains.push(expected.to_string());
self
@ -631,6 +635,7 @@ impl Execs {
/// its output, and should be repeated `number` times.
///
/// See [`compare`] for supported patterns.
#[deprecated(note = "replaced with `Execs::with_stdout_data(expected)`")]
pub fn with_stdout_contains_n<S: ToString>(&mut self, expected: S, number: usize) -> &mut Self {
self.expect_stdout_contains_n
.push((expected.to_string(), number));
@ -642,6 +647,7 @@ impl Execs {
/// See [`compare`] for supported patterns.
///
/// See note on [`Self::with_stderr_does_not_contain`].
#[deprecated]
pub fn with_stdout_does_not_contain<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stdout_not_contains.push(expected.to_string());
self
@ -656,6 +662,7 @@ impl Execs {
/// your test will pass without verifying the correct behavior. If
/// possible, write the test first so that it fails, and then implement
/// your fix/feature to make it pass.
#[deprecated]
pub fn with_stderr_does_not_contain<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stderr_not_contains.push(expected.to_string());
self
@ -665,6 +672,7 @@ impl Execs {
/// ignoring the order of the lines.
///
/// See [`Execs::with_stderr_unordered`] for more details.
#[deprecated(note = "replaced with `Execs::with_stdout_data(expected.unordered())`")]
pub fn with_stdout_unordered<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stdout_unordered.push(expected.to_string());
self
@ -691,6 +699,7 @@ impl Execs {
///
/// This will randomly fail if the other crate name is `bar`, and the
/// order changes.
#[deprecated(note = "replaced with `Execs::with_stderr_data(expected.unordered())`")]
pub fn with_stderr_unordered<S: ToString>(&mut self, expected: S) -> &mut Self {
self.expect_stderr_unordered.push(expected.to_string());
self
@ -718,6 +727,7 @@ impl Execs {
///
/// Be careful writing the `without` fragments, see note in
/// `with_stderr_does_not_contain`.
#[deprecated]
pub fn with_stderr_line_without<S: ToString>(
&mut self,
with: &[S],
@ -750,6 +760,7 @@ impl Execs {
/// - The order of arrays is ignored.
/// - Strings support patterns described in [`compare`].
/// - Use `"{...}"` to match any object.
#[deprecated(note = "replaced with `Execs::with_stdout_data(expected.json_lines())`")]
pub fn with_json(&mut self, expected: &str) -> &mut Self {
self.expect_json = Some(expected.to_string());
self
@ -764,6 +775,7 @@ impl Execs {
/// what you are doing.
///
/// See `with_json` for more detail.
#[deprecated]
pub fn with_json_contains_unordered(&mut self, expected: &str) -> &mut Self {
match &mut self.expect_json_contains_unordered {
None => self.expect_json_contains_unordered = Some(expected.to_string()),

View File

@ -19,6 +19,7 @@
//! Otherwise the tests are skipped.
#![allow(clippy::disallowed_methods)]
#![allow(deprecated)]
use cargo_test_support::*;
use std::env;

View File

@ -1,5 +1,7 @@
//! -Zadvanced-env tests
#![allow(deprecated)]
use cargo_test_support::{paths, project, registry::Package};
#[cargo_test]

View File

@ -1,5 +1,7 @@
//! Tests for alternative registries.
#![allow(deprecated)]
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::publish::validate_alt_upload;
use cargo_test_support::registry::{self, Package, RegistryBuilder};

View File

@ -1,6 +1,8 @@
//! Tests specific to artifact dependencies, designated using
//! the new `dep = { artifact = "bin", … }` syntax in manifests.
#![allow(deprecated)]
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::registry::{Package, RegistryBuilder};
use cargo_test_support::str;

View File

@ -1,5 +1,7 @@
//! Tests for --artifact-dir flag.
#![allow(deprecated)]
use cargo_test_support::sleep_ms;
use cargo_test_support::{basic_manifest, project};
use std::env;

View File

@ -1,5 +1,7 @@
//! Tests for some invalid .cargo/config files.
#![allow(deprecated)]
use cargo_test_support::git::cargo_uses_gitoxide;
use cargo_test_support::registry::{self, Package};
use cargo_test_support::{basic_manifest, project, rustc_host};

View File

@ -1,5 +1,7 @@
//! Tests for invalid --manifest-path arguments.
#![allow(deprecated)]
use cargo_test_support::{basic_bin_manifest, main_file, project};
#[track_caller]

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo bench` command.
#![allow(deprecated)]
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::{basic_bin_manifest, basic_lib_manifest, basic_manifest, project};

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::install::{
assert_has_installed_exe, assert_has_not_installed_exe, cargo_home,
};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo build` command.
#![allow(deprecated)]
use cargo::{
core::compiler::CompileMode,
core::{Shell, Workspace},

View File

@ -1,5 +1,7 @@
//! Tests for --build-plan feature.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_bin_manifest, basic_manifest, main_file, project};

View File

@ -1,5 +1,7 @@
//! Tests for build.rs scripts.
#![allow(deprecated)]
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::install::cargo_home;
use cargo_test_support::paths::CargoPathExt;

View File

@ -1,5 +1,7 @@
//! Tests for build.rs rerun-if-env-changed and rustc-env
#![allow(deprecated)]
use cargo_test_support::basic_manifest;
use cargo_test_support::project;
use cargo_test_support::sleep_ms;

View File

@ -4,6 +4,8 @@
// because MSVC link.exe just gives a warning on unknown flags (how helpful!),
// and other linkers will return an error.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_bin_manifest, basic_lib_manifest, basic_manifest, project};

View File

@ -1,5 +1,7 @@
//! Tests for `CacheLock`.
#![allow(deprecated)]
use crate::config::GlobalContextBuilder;
use cargo::util::cache_lock::{CacheLockMode, CacheLocker};
use cargo_test_support::paths::{self, CargoPathExt};

View File

@ -1,5 +1,7 @@
//! Tests for caching compiler diagnostics.
#![allow(deprecated)]
use super::messages::raw_rustc_output;
use cargo_test_support::tools;
use cargo_test_support::{basic_manifest, is_coarse_mtime, project, registry::Package, sleep_ms};

View File

@ -1,5 +1,7 @@
//! Tests for `[alias]` config command aliases.
#![allow(deprecated)]
use std::env;
use cargo_test_support::tools::echo_subcommand;

View File

@ -1,5 +1,7 @@
//! Tests for custom cargo commands and other global command features.
#![allow(deprecated)]
use std::env;
use std::fs;
use std::io::Read;

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo config` command.
#![allow(deprecated)]
use super::config::write_config_at;
use cargo_test_support::paths;
use std::fs;

View File

@ -1,5 +1,7 @@
//! Tests for `[env]` config.
#![allow(deprecated)]
use cargo_test_support::basic_manifest;
use cargo_test_support::{basic_bin_manifest, project};

View File

@ -1,5 +1,7 @@
//! Tests for `cargo-features` definitions.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::{project, registry};

View File

@ -1,5 +1,7 @@
//! Tests specifically related to target handling (lib, bins, examples, tests, benches).
#![allow(deprecated)]
use cargo_test_support::project;
#[cargo_test]

View File

@ -1,5 +1,7 @@
//! Tests for cfg() expressions.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::rustc_host;
use cargo_test_support::{basic_manifest, project};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo check` command.
#![allow(deprecated)]
use std::fmt::{self, Write};
use crate::messages::raw_rustc_output;

View File

@ -1,5 +1,7 @@
//! Tests for Cargo usage of rustc `--check-cfg`.
#![allow(deprecated)]
use cargo_test_support::{basic_manifest, project};
macro_rules! x {

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo clean` command.
#![allow(deprecated)]
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::registry::Package;
use cargo_test_support::{

View File

@ -3,6 +3,8 @@
//! Ideally these should never happen, but I don't think we'll ever be able to
//! prevent all collisions.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, cross_compile, project};
use std::env;

View File

@ -1,5 +1,7 @@
//! Tests for running multiple `cargo` processes at the same time.
#![allow(deprecated)]
use std::fs;
use std::net::TcpListener;
use std::process::Stdio;

View File

@ -1,5 +1,7 @@
//! Tests for config settings.
#![allow(deprecated)]
use cargo::core::features::{GitFeatures, GitoxideFeatures};
use cargo::core::{PackageIdSpec, Shell};
use cargo::util::context::{

View File

@ -1,5 +1,7 @@
//! Tests for the --config CLI option.
#![allow(deprecated)]
use super::config::{
assert_error, read_output, write_config_at, write_config_toml, GlobalContextBuilder,
};

View File

@ -1,5 +1,7 @@
//! Tests for `include` config field.
#![allow(deprecated)]
use super::config::{assert_error, write_config_at, write_config_toml, GlobalContextBuilder};
use cargo_test_support::{no_such_file_err_msg, project};

View File

@ -1,5 +1,7 @@
//! Tests for corrupt git repos.
#![allow(deprecated)]
use cargo_test_support::paths;
use cargo_test_support::{basic_manifest, git, project};
use cargo_util::paths as cargopaths;

View File

@ -1,5 +1,7 @@
//! Tests for credential-process.
#![allow(deprecated)]
use cargo_test_support::registry::{Package, TestRegistry};
use cargo_test_support::{basic_manifest, cargo_process, paths, project, registry, Project};

View File

@ -2,6 +2,8 @@
//!
//! See `cargo_test_support::cross_compile` for more detail.
#![allow(deprecated)]
use cargo_test_support::rustc_host;
use cargo_test_support::{basic_bin_manifest, basic_manifest, cross_compile, project};

View File

@ -1,5 +1,7 @@
//! Tests for publishing using the `--target` flag.
#![allow(deprecated)]
use std::fs::File;
use cargo_test_support::{cross_compile, project, publish, registry};

View File

@ -1,5 +1,7 @@
//! Tests for custom json target specifications.
#![allow(deprecated)]
use cargo_test_support::{basic_manifest, project};
use std::fs;

View File

@ -1,5 +1,7 @@
//! Tests for ctrl-C handling.
#![allow(deprecated)]
use cargo_test_support::{project, slow_cpu_multiplier};
use std::fs;
use std::io::{self, Read};

View File

@ -1,6 +1,8 @@
//! Tests for dep-info files. This includes the dep-info file Cargo creates in
//! the output directory, and the ones stored in the fingerprint.
#![allow(deprecated)]
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::paths::{self, CargoPathExt};
use cargo_test_support::registry::Package;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::project;
#[cargo_test]

View File

@ -2,6 +2,8 @@
//!
//! Note: Some tests are located in the resolver-tests package.
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::registry::Package;

View File

@ -1,5 +1,7 @@
//! Tests for directory sources.
#![allow(deprecated)]
use std::collections::HashMap;
use std::fs;
use std::str;

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo doc` command.
#![allow(deprecated)]
use cargo::core::compiler::RustDocFingerprint;
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::registry::Package;

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo doc` command with `-Zrustdoc-scrape-examples`.
#![allow(deprecated)]
use cargo_test_support::project;
#[cargo_test(nightly, reason = "rustdoc scrape examples flags are unstable")]

View File

@ -1,5 +1,7 @@
//! Tests for edition setting.
#![allow(deprecated)]
use cargo::core::Edition;
use cargo_test_support::{basic_lib_manifest, project};

View File

@ -1,5 +1,7 @@
//! General error tests that don't belong anywhere else.
#![allow(deprecated)]
use cargo_test_support::cargo_process;
#[cargo_test]

View File

@ -1,5 +1,7 @@
//! Tests for `[features]` table.
#![allow(deprecated)]
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::registry::{Dependency, Package};
use cargo_test_support::{basic_manifest, project};

View File

@ -1,5 +1,7 @@
//! Tests for the new feature resolver.
#![allow(deprecated)]
use cargo_test_support::cross_compile::{self, alternate};
use cargo_test_support::install::cargo_home;
use cargo_test_support::paths::CargoPathExt;

View File

@ -1,5 +1,7 @@
//! Tests for namespaced features.
#![allow(deprecated)]
use super::features2::switch_to_resolver_2;
use cargo_test_support::registry::{Dependency, Package, RegistryBuilder};
use cargo_test_support::{project, publish};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo fetch` command.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::rustc_host;
use cargo_test_support::{basic_manifest, cross_compile, project};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo fix` command.
#![allow(deprecated)]
use cargo::core::Edition;
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::git::{self, init};

View File

@ -14,6 +14,8 @@
//! The [`expect_fix_runs_rustc_n_times`] function handles setting everything
//! up, and verifying the results.
#![allow(deprecated)]
use cargo_test_support::{basic_manifest, paths, project, tools, Execs};
use std::path::PathBuf;
use std::sync::{Mutex, OnceLock};

View File

@ -1,5 +1,7 @@
//! Tests for fingerprinting (rebuild detection).
#![allow(deprecated)]
use filetime::FileTime;
use std::fs::{self, OpenOptions};
use std::io;

View File

@ -7,6 +7,8 @@
//! So we pick some random lint that will likely always be the same
//! over time.
#![allow(deprecated)]
use super::config::write_config_toml;
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, project, Project};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo generate-lockfile` command.
#![allow(deprecated)]
use cargo_test_support::registry::{Package, RegistryBuilder};
use cargo_test_support::{basic_manifest, paths, project, ProjectBuilder};
use std::fs;

View File

@ -1,5 +1,7 @@
//! Tests for git support.
#![allow(deprecated)]
use std::fs;
use std::io::prelude::*;
use std::net::{TcpListener, TcpStream};

View File

@ -1,5 +1,7 @@
//! Tests for git authentication.
#![allow(deprecated)]
use std::collections::HashSet;
use std::io::prelude::*;
use std::io::BufReader;

View File

@ -1,5 +1,7 @@
//! Tests for git garbage collection.
#![allow(deprecated)]
use std::env;
use std::ffi::OsStr;
use std::path::PathBuf;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use crate::git_gc::find_index;
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, git, paths, project};

View File

@ -1,5 +1,7 @@
//! Tests for target filter flags with glob patterns.
#![allow(deprecated)]
use cargo_test_support::{project, Project};
#[cargo_test]

View File

@ -6,6 +6,8 @@
//! what happens when time passes. The [`days_ago_unix`] and
//! [`months_ago_unix`] functions help with setting this value.
#![allow(deprecated)]
use super::config::GlobalContextBuilder;
use cargo::core::global_cache_tracker::{self, DeferredGlobalLastUse, GlobalCacheTracker};
use cargo::util::cache_lock::CacheLockMode;

View File

@ -1,5 +1,7 @@
//! Tests for cargo's help output.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, cargo_exe, cargo_process, paths, process, project};
use std::fs;

View File

@ -3,6 +3,8 @@
//! Note that these tests will generally require setting CARGO_CONTAINER_TESTS
//! or CARGO_PUBLIC_NETWORK_TESTS.
#![allow(deprecated)]
use cargo_test_support::containers::Container;
use cargo_test_support::project;

View File

@ -1,4 +1,6 @@
//! Tests for inheriting Cargo.toml fields with field.workspace = true
#![allow(deprecated)]
use cargo_test_support::registry::{Dependency, Package, RegistryBuilder};
use cargo_test_support::{
basic_lib_manifest, basic_manifest, git, path2url, paths, project, publish, registry,

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo install` command.
#![allow(deprecated)]
use std::fs::{self, OpenOptions};
use std::io::prelude::*;
use std::path::Path;

View File

@ -1,5 +1,7 @@
//! Tests for `cargo install` where it upgrades a package if it is out-of-date.
#![allow(deprecated)]
use cargo::core::PackageId;
use std::collections::BTreeSet;
use std::env;

View File

@ -1,5 +1,7 @@
//! Tests for the jobserver protocol.
#![allow(deprecated)]
use cargo_util::is_ci;
use std::env;
use std::net::TcpListener;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::registry::Package;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::registry::Package;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::project;
#[cargo_test]

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::registry::Package;

View File

@ -1,5 +1,7 @@
//! Tests for `[lints]`
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::registry::Package;

View File

@ -1,6 +1,8 @@
//! Tests for packages/target filter flags giving suggestions on which
//! packages/targets are available.
#![allow(deprecated)]
use cargo_test_support::project;
const EXAMPLE: u8 = 1 << 0;

View File

@ -1,5 +1,7 @@
//! Tests for local-registry sources.
#![allow(deprecated)]
use cargo_test_support::paths::{self, CargoPathExt};
use cargo_test_support::registry::{registry_path, Package};
use cargo_test_support::{basic_manifest, project, t};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo locate-project` command.
#![allow(deprecated)]
use cargo_test_support::project;
#[cargo_test]

View File

@ -1,5 +1,7 @@
//! Tests for supporting older versions of the Cargo.lock file format.
#![allow(deprecated)]
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::git;
use cargo_test_support::registry::Package;

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo login` command.
#![allow(deprecated)]
use cargo_test_support::cargo_process;
use cargo_test_support::paths::{self, CargoPathExt};
use cargo_test_support::registry::{self, RegistryBuilder};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo logout` command.
#![allow(deprecated)]
use super::login::check_token;
use cargo_test_support::paths::{self, CargoPathExt};
use cargo_test_support::registry::TestRegistry;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo::core::compiler::Lto;
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, project, Project};

View File

@ -1,5 +1,7 @@
//! Tests for workspace member discovery.
#![allow(deprecated)]
use cargo::core::{Shell, Workspace};
use cargo::util::context::GlobalContext;

View File

@ -1,5 +1,7 @@
//! Tests for workspace member errors.
#![allow(deprecated)]
use cargo::core::resolver::ResolveError;
use cargo::core::{compiler::CompileMode, Shell, Workspace};
use cargo::ops::{self, CompileOptions};

View File

@ -1,5 +1,7 @@
//! Tests for --message-format flag.
#![allow(deprecated)]
use cargo_test_support::{basic_lib_manifest, basic_manifest, project};
#[cargo_test]

View File

@ -2,6 +2,8 @@
//!
//! Tests for message caching can be found in `cache_messages`.
#![allow(deprecated)]
use cargo_test_support::{process, project, Project};
use cargo_util::ProcessError;

View File

@ -1,5 +1,7 @@
//! Tests for the metabuild feature (declarative build scripts).
#![allow(deprecated)]
use cargo_test_support::{
basic_lib_manifest, basic_manifest, is_coarse_mtime, project, registry::Package, rustc_host,
Project,

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo metadata` command.
#![allow(deprecated)]
use cargo_test_support::install::cargo_home;
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::registry::Package;

View File

@ -2,6 +2,8 @@
//!
//! Note: Some tests are located in the resolver-tests package.
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::registry::Package;

View File

@ -1,5 +1,7 @@
//! Tests for multiple `--target` flags to subcommands
#![allow(deprecated)]
use cargo_test_support::{basic_manifest, cross_compile, project, rustc_host};
#[cargo_test]

View File

@ -1,5 +1,7 @@
//! Tests for network configuration.
#![allow(deprecated)]
use cargo_test_support::project;
#[cargo_test]

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo new` command.
#![allow(deprecated)]
use cargo_test_support::cargo_process;
use cargo_test_support::paths;
use std::env;

View File

@ -1,5 +1,7 @@
//! Tests for --offline flag.
#![allow(deprecated)]
use cargo_test_support::{
basic_manifest, git, main_file, path2url, project,
registry::{Package, RegistryBuilder},

View File

@ -10,6 +10,8 @@
//! cargo test --test testsuite -- old_cargos --nocapture --ignored
//! ```
#![allow(deprecated)]
use cargo::CargoResult;
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::registry::{self, Dependency, Package};

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::registry::RegistryBuilder;

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo owner` command.
#![allow(deprecated)]
use std::fs;
use cargo_test_support::paths::CargoPathExt;

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo package` command.
#![allow(deprecated)]
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::publish::validate_crate_contents;
use cargo_test_support::registry::{self, Package};

View File

@ -1,5 +1,7 @@
//! Tests for feature selection on the command-line.
#![allow(deprecated)]
use super::features2::switch_to_resolver_2;
use cargo_test_support::registry::{Dependency, Package};
use cargo_test_support::{basic_manifest, project};

View File

@ -1,5 +1,7 @@
//! Tests for `[patch]` table source replacement.
#![allow(deprecated)]
use cargo_test_support::git;
use cargo_test_support::paths;
use cargo_test_support::registry::{self, Package};

View File

@ -1,5 +1,7 @@
//! Tests for `path` dependencies.
#![allow(deprecated)]
use cargo_test_support::paths::{self, CargoPathExt};
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_lib_manifest, basic_manifest, main_file, project};

View File

@ -1,5 +1,7 @@
//! Tests for `paths` overrides.
#![allow(deprecated)]
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, project};

View File

@ -1,5 +1,7 @@
//! Tests for the `cargo pkgid` command.
#![allow(deprecated)]
use cargo_test_support::basic_lib_manifest;
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::git;

View File

@ -1,5 +1,7 @@
//! Tests for selecting pre-release versions with `update --precise`.
#![allow(deprecated)]
use cargo_test_support::project;
#[cargo_test]

Some files were not shown because too many files have changed in this diff Show More