]> git.proxmox.com Git - cargo.git/commitdiff
test(add): Import cargo-add tests
authorEd Page <eopage@gmail.com>
Thu, 10 Mar 2022 17:20:50 +0000 (11:20 -0600)
committerEd Page <eopage@gmail.com>
Mon, 11 Apr 2022 18:09:40 +0000 (13:09 -0500)
This is a fork of https://github.com/killercup/cargo-edit/tree/merge-add
at d561719161ed5564111ff2152ff206463ec24cef

492 files changed:
Cargo.toml
tests/snapshots/add/add-basic.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/add-basic.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/add_basic.in [new symlink]
tests/snapshots/add/add_basic.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/add_basic.stderr [new file with mode: 0644]
tests/snapshots/add/add_basic.stdout [new file with mode: 0644]
tests/snapshots/add/add_multiple.in [new symlink]
tests/snapshots/add/add_multiple.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/add_multiple.stderr [new file with mode: 0644]
tests/snapshots/add/add_multiple.stdout [new file with mode: 0644]
tests/snapshots/add/add_normalized_name_external.in [new symlink]
tests/snapshots/add/add_normalized_name_external.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/add_normalized_name_external.stderr [new file with mode: 0644]
tests/snapshots/add/add_normalized_name_external.stdout [new file with mode: 0644]
tests/snapshots/add/build.in [new symlink]
tests/snapshots/add/build.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/build.stderr [new file with mode: 0644]
tests/snapshots/add/build.stdout [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.stderr [new file with mode: 0644]
tests/snapshots/add/build_prefer_existing_version.stdout [new file with mode: 0644]
tests/snapshots/add/change_rename_target.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/change_rename_target.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/change_rename_target.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/change_rename_target.stderr [new file with mode: 0644]
tests/snapshots/add/change_rename_target.stdout [new file with mode: 0644]
tests/snapshots/add/default_features.in [new symlink]
tests/snapshots/add/default_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/default_features.stderr [new file with mode: 0644]
tests/snapshots/add/default_features.stdout [new file with mode: 0644]
tests/snapshots/add/deprecated_default_features.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/deprecated_default_features.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/deprecated_default_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/deprecated_default_features.stderr [new file with mode: 0644]
tests/snapshots/add/deprecated_default_features.stdout [new file with mode: 0644]
tests/snapshots/add/deprecated_section.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/deprecated_section.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/deprecated_section.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/deprecated_section.stderr [new file with mode: 0644]
tests/snapshots/add/deprecated_section.stdout [new file with mode: 0644]
tests/snapshots/add/dev.in [new symlink]
tests/snapshots/add/dev.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/dev.stderr [new file with mode: 0644]
tests/snapshots/add/dev.stdout [new file with mode: 0644]
tests/snapshots/add/dev_build_conflict.in [new symlink]
tests/snapshots/add/dev_build_conflict.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/dev_build_conflict.stderr [new file with mode: 0644]
tests/snapshots/add/dev_build_conflict.stdout [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.stderr [new file with mode: 0644]
tests/snapshots/add/dev_prefer_existing_version.stdout [new file with mode: 0644]
tests/snapshots/add/dry_run.in [new symlink]
tests/snapshots/add/dry_run.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/dry_run.stderr [new file with mode: 0644]
tests/snapshots/add/dry_run.stdout [new file with mode: 0644]
tests/snapshots/add/features.in [new symlink]
tests/snapshots/add/features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/features.stderr [new file with mode: 0644]
tests/snapshots/add/features.stdout [new file with mode: 0644]
tests/snapshots/add/features_empty.in [new symlink]
tests/snapshots/add/features_empty.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/features_empty.stderr [new file with mode: 0644]
tests/snapshots/add/features_empty.stdout [new file with mode: 0644]
tests/snapshots/add/features_multiple_occurrences.in [new symlink]
tests/snapshots/add/features_multiple_occurrences.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/features_multiple_occurrences.stderr [new file with mode: 0644]
tests/snapshots/add/features_multiple_occurrences.stdout [new file with mode: 0644]
tests/snapshots/add/features_preserve.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/features_preserve.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/features_preserve.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/features_preserve.stderr [new file with mode: 0644]
tests/snapshots/add/features_preserve.stdout [new file with mode: 0644]
tests/snapshots/add/features_spaced_values.in [new symlink]
tests/snapshots/add/features_spaced_values.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/features_spaced_values.stderr [new file with mode: 0644]
tests/snapshots/add/features_spaced_values.stdout [new file with mode: 0644]
tests/snapshots/add/features_unknown.in [new symlink]
tests/snapshots/add/features_unknown.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/features_unknown.stderr [new file with mode: 0644]
tests/snapshots/add/features_unknown.stdout [new file with mode: 0644]
tests/snapshots/add/git.in [new symlink]
tests/snapshots/add/git.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git.stderr [new file with mode: 0644]
tests/snapshots/add/git.stdout [new file with mode: 0644]
tests/snapshots/add/git_branch.in [new symlink]
tests/snapshots/add/git_branch.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_branch.stderr [new file with mode: 0644]
tests/snapshots/add/git_branch.stdout [new file with mode: 0644]
tests/snapshots/add/git_conflicts_namever.in [new symlink]
tests/snapshots/add/git_conflicts_namever.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_conflicts_namever.stderr [new file with mode: 0644]
tests/snapshots/add/git_conflicts_namever.stdout [new file with mode: 0644]
tests/snapshots/add/git_dev.in [new symlink]
tests/snapshots/add/git_dev.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_dev.stderr [new file with mode: 0644]
tests/snapshots/add/git_dev.stdout [new file with mode: 0644]
tests/snapshots/add/git_inferred_name.in [new symlink]
tests/snapshots/add/git_inferred_name.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_inferred_name.stderr [new file with mode: 0644]
tests/snapshots/add/git_inferred_name.stdout [new file with mode: 0644]
tests/snapshots/add/git_inferred_name_multiple.in [new symlink]
tests/snapshots/add/git_inferred_name_multiple.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_inferred_name_multiple.stderr [new file with mode: 0644]
tests/snapshots/add/git_inferred_name_multiple.stdout [new file with mode: 0644]
tests/snapshots/add/git_multiple_names.in [new symlink]
tests/snapshots/add/git_multiple_names.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_multiple_names.stderr [new file with mode: 0644]
tests/snapshots/add/git_multiple_names.stdout [new file with mode: 0644]
tests/snapshots/add/git_normalized_name.in [new symlink]
tests/snapshots/add/git_normalized_name.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_normalized_name.stderr [new file with mode: 0644]
tests/snapshots/add/git_normalized_name.stdout [new file with mode: 0644]
tests/snapshots/add/git_registry.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_registry.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/git_registry.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_registry.stderr [new file with mode: 0644]
tests/snapshots/add/git_registry.stdout [new file with mode: 0644]
tests/snapshots/add/git_rev.in [new symlink]
tests/snapshots/add/git_rev.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_rev.stderr [new file with mode: 0644]
tests/snapshots/add/git_rev.stdout [new file with mode: 0644]
tests/snapshots/add/git_tag.in [new symlink]
tests/snapshots/add/git_tag.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/git_tag.stderr [new file with mode: 0644]
tests/snapshots/add/git_tag.stdout [new file with mode: 0644]
tests/snapshots/add/infer_prerelease.in [new symlink]
tests/snapshots/add/infer_prerelease.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/infer_prerelease.stderr [new file with mode: 0644]
tests/snapshots/add/infer_prerelease.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_arg.in [new symlink]
tests/snapshots/add/invalid_arg.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_arg.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_arg.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_git_external.in [new symlink]
tests/snapshots/add/invalid_git_external.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_git_external.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_git_external.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_git_name.in [new symlink]
tests/snapshots/add/invalid_git_name.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_git_name.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_git_name.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_manifest.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_manifest.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/invalid_manifest.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_manifest.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_manifest.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_name_external.in [new symlink]
tests/snapshots/add/invalid_name_external.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_name_external.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_name_external.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_path.in [new symlink]
tests/snapshots/add/invalid_path.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_path.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_path.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_path_name.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_path_self.in [new symlink]
tests/snapshots/add/invalid_path_self.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_path_self.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_path_self.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_target_empty.in [new symlink]
tests/snapshots/add/invalid_target_empty.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_target_empty.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_target_empty.stdout [new file with mode: 0644]
tests/snapshots/add/invalid_vers.in [new symlink]
tests/snapshots/add/invalid_vers.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/invalid_vers.stderr [new file with mode: 0644]
tests/snapshots/add/invalid_vers.stdout [new file with mode: 0644]
tests/snapshots/add/list_features.in [new symlink]
tests/snapshots/add/list_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features.stderr [new file with mode: 0644]
tests/snapshots/add/list_features.stdout [new file with mode: 0644]
tests/snapshots/add/list_features_path.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/list_features_path.in/optional/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path.in/optional/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/list_features_path.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/list_features_path.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path.stderr [new file with mode: 0644]
tests/snapshots/add/list_features_path.stdout [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.in/optional/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.in/optional/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.stderr [new file with mode: 0644]
tests/snapshots/add/list_features_path_no_default.stdout [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.stderr [new file with mode: 0644]
tests/snapshots/add/manifest_path_package.stdout [new file with mode: 0644]
tests/snapshots/add/multiple_conflicts_with_features.in [new symlink]
tests/snapshots/add/multiple_conflicts_with_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/multiple_conflicts_with_features.stderr [new file with mode: 0644]
tests/snapshots/add/multiple_conflicts_with_features.stdout [new file with mode: 0644]
tests/snapshots/add/multiple_conflicts_with_rename.in [new symlink]
tests/snapshots/add/multiple_conflicts_with_rename.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/multiple_conflicts_with_rename.stderr [new file with mode: 0644]
tests/snapshots/add/multiple_conflicts_with_rename.stdout [new file with mode: 0644]
tests/snapshots/add/namever.in [new symlink]
tests/snapshots/add/namever.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/namever.stderr [new file with mode: 0644]
tests/snapshots/add/namever.stdout [new file with mode: 0644]
tests/snapshots/add/no_args.in [new symlink]
tests/snapshots/add/no_args.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/no_args.stderr [new file with mode: 0644]
tests/snapshots/add/no_args.stdout [new file with mode: 0644]
tests/snapshots/add/no_default_features.in [new symlink]
tests/snapshots/add/no_default_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/no_default_features.stderr [new file with mode: 0644]
tests/snapshots/add/no_default_features.stdout [new file with mode: 0644]
tests/snapshots/add/no_optional.in [new symlink]
tests/snapshots/add/no_optional.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/no_optional.stderr [new file with mode: 0644]
tests/snapshots/add/no_optional.stdout [new file with mode: 0644]
tests/snapshots/add/optional.in [new symlink]
tests/snapshots/add/optional.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/optional.stderr [new file with mode: 0644]
tests/snapshots/add/optional.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features_with_no_default_features.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features_with_no_default_features.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features_with_no_default_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features_with_no_default_features.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_default_features_with_no_default_features.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_features.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_features.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_features.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_features.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_git_with_path.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_inline_features.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_inline_features.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_inline_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_inline_features.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_inline_features.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_name_dev_noop.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_name_noop.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features_with_default_features.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features_with_default_features.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features_with_default_features.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features_with_default_features.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_no_default_features_with_default_features.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional_with_optional.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional_with_optional.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional_with_optional.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional_with_optional.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_no_optional_with_optional.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_optional.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_optional.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_optional.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_optional.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_optional.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_optional_with_no_optional.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_optional_with_no_optional.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_optional_with_no_optional.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_optional_with_no_optional.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_optional_with_no_optional.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_path_noop.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_path_with_version.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_no_rename.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_no_rename.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_no_rename.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_no_rename.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_no_rename.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename_noop.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename_noop.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename_noop.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename_noop.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_rename_with_rename_noop.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_git.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_git.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_git.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_git.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_git.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_version_with_path.stdout [new file with mode: 0644]
tests/snapshots/add/overwrite_with_rename.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_with_rename.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/overwrite_with_rename.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/overwrite_with_rename.stderr [new file with mode: 0644]
tests/snapshots/add/overwrite_with_rename.stdout [new file with mode: 0644]
tests/snapshots/add/path.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path.stderr [new file with mode: 0644]
tests/snapshots/add/path.stdout [new file with mode: 0644]
tests/snapshots/add/path_dev.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_dev.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_dev.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_dev.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_dev.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_dev.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_dev.stderr [new file with mode: 0644]
tests/snapshots/add/path_dev.stdout [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.stderr [new file with mode: 0644]
tests/snapshots/add/path_inferred_name.stdout [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/optional/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/optional/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.stderr [new file with mode: 0644]
tests/snapshots/add/path_inferred_name_conflicts_full_feature.stdout [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.stderr [new file with mode: 0644]
tests/snapshots/add/path_normalized_name.stdout [new file with mode: 0644]
tests/snapshots/add/preserve_sorted.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/preserve_sorted.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/preserve_sorted.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/preserve_sorted.stderr [new file with mode: 0644]
tests/snapshots/add/preserve_sorted.stdout [new file with mode: 0644]
tests/snapshots/add/preserve_unsorted.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/preserve_unsorted.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/preserve_unsorted.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/preserve_unsorted.stderr [new file with mode: 0644]
tests/snapshots/add/preserve_unsorted.stdout [new file with mode: 0644]
tests/snapshots/add/quiet.in [new symlink]
tests/snapshots/add/quiet.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/quiet.stderr [new file with mode: 0644]
tests/snapshots/add/quiet.stdout [new file with mode: 0644]
tests/snapshots/add/registry.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/registry.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/registry.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/registry.stderr [new file with mode: 0644]
tests/snapshots/add/registry.stdout [new file with mode: 0644]
tests/snapshots/add/rename.in [new symlink]
tests/snapshots/add/rename.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/rename.stderr [new file with mode: 0644]
tests/snapshots/add/rename.stdout [new file with mode: 0644]
tests/snapshots/add/require_weak.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/require_weak.in/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/require_weak.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/require_weak.stderr [new file with mode: 0644]
tests/snapshots/add/require_weak.stdout [new file with mode: 0644]
tests/snapshots/add/target.in [new symlink]
tests/snapshots/add/target.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/target.stderr [new file with mode: 0644]
tests/snapshots/add/target.stdout [new file with mode: 0644]
tests/snapshots/add/target_cfg.in [new symlink]
tests/snapshots/add/target_cfg.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/target_cfg.stderr [new file with mode: 0644]
tests/snapshots/add/target_cfg.stdout [new file with mode: 0644]
tests/snapshots/add/vers.in [new symlink]
tests/snapshots/add/vers.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/vers.stderr [new file with mode: 0644]
tests/snapshots/add/vers.stdout [new file with mode: 0644]
tests/snapshots/add/workspace_name.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_name.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_name.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/workspace_name.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_name.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/workspace_name.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_name.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_name.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_name.stderr [new file with mode: 0644]
tests/snapshots/add/workspace_name.stdout [new file with mode: 0644]
tests/snapshots/add/workspace_path.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/workspace_path.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/workspace_path.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path.stderr [new file with mode: 0644]
tests/snapshots/add/workspace_path.stdout [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.in/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.in/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.in/dependency/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.in/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.in/primary/src/lib.rs [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.out/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.out/dependency/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.out/primary/Cargo.toml [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.stderr [new file with mode: 0644]
tests/snapshots/add/workspace_path_dev.stdout [new file with mode: 0644]
tests/snapshots/copy.sh [new file with mode: 0755]
tests/snapshots/rename.sh [new file with mode: 0755]
tests/testsuite/cargo_add.rs [new file with mode: 0644]
tests/testsuite/main.rs

index ca8f3646dd32f47341d8b7fdaa548c9b46f34d7b..e5b9144506af67857f333d2a0af871c7506cec07 100644 (file)
@@ -100,6 +100,7 @@ features = [
 [dev-dependencies]
 cargo-test-macro = { path = "crates/cargo-test-macro" }
 cargo-test-support = { path = "crates/cargo-test-support" }
+snapbox = { version = "0.2.8", features = ["diff", "path"] }
 
 [build-dependencies]
 flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] }
diff --git a/tests/snapshots/add/add-basic.in/Cargo.toml b/tests/snapshots/add/add-basic.in/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/add-basic.in/src/lib.rs b/tests/snapshots/add/add-basic.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/add_basic.in b/tests/snapshots/add/add_basic.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/add_basic.out/Cargo.toml b/tests/snapshots/add/add_basic.out/Cargo.toml
new file mode 100644 (file)
index 0000000..5964c87
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package = "99999.0.0"
diff --git a/tests/snapshots/add/add_basic.stderr b/tests/snapshots/add/add_basic.stderr
new file mode 100644 (file)
index 0000000..fd6b711
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding my-package v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/add_basic.stdout b/tests/snapshots/add/add_basic.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/add_multiple.in b/tests/snapshots/add/add_multiple.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/add_multiple.out/Cargo.toml b/tests/snapshots/add/add_multiple.out/Cargo.toml
new file mode 100644 (file)
index 0000000..ba8d7ea
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "99999.0.0"
diff --git a/tests/snapshots/add/add_multiple.stderr b/tests/snapshots/add/add_multiple.stderr
new file mode 100644 (file)
index 0000000..d0b4e73
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/add_multiple.stdout b/tests/snapshots/add/add_multiple.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/add_normalized_name_external.in b/tests/snapshots/add/add_normalized_name_external.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/add_normalized_name_external.out/Cargo.toml b/tests/snapshots/add/add_normalized_name_external.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3d0dec3
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+inflector = "0.11.4"
+linked-hash-map = "0.5.4"
diff --git a/tests/snapshots/add/add_normalized_name_external.stderr b/tests/snapshots/add/add_normalized_name_external.stderr
new file mode 100644 (file)
index 0000000..c7d4511
--- /dev/null
@@ -0,0 +1,18 @@
+    Updating `dummy-registry` index
+warning: translating `linked_hash_map` to `linked-hash-map`
+warning: translating `Inflector` to `inflector`
+      Adding linked-hash-map v0.5.4 to dependencies.
+             Features:
+             - clippy
+             - heapsize
+             - heapsize_impl
+             - nightly
+             - serde
+             - serde_impl
+             - serde_test
+      Adding inflector v0.11.4 to dependencies.
+             Features:
+             + heavyweight
+             + lazy_static
+             + regex
+             - unstable
diff --git a/tests/snapshots/add/add_normalized_name_external.stdout b/tests/snapshots/add/add_normalized_name_external.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/build.in b/tests/snapshots/add/build.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/build.out/Cargo.toml b/tests/snapshots/add/build.out/Cargo.toml
new file mode 100644 (file)
index 0000000..cceb448
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[build-dependencies]
+my-build-package1 = "99999.0.0"
+my-build-package2 = "99999.0.0"
diff --git a/tests/snapshots/add/build.stderr b/tests/snapshots/add/build.stderr
new file mode 100644 (file)
index 0000000..b873c5a
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-build-package1 v99999.0.0 to build-dependencies.
+      Adding my-build-package2 v99999.0.0 to build-dependencies.
diff --git a/tests/snapshots/add/build.stdout b/tests/snapshots/add/build.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/build_prefer_existing_version.in/Cargo.toml b/tests/snapshots/add/build_prefer_existing_version.in/Cargo.toml
new file mode 100644 (file)
index 0000000..6a6ac82
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["one", "two"], registry = "alternative" }
diff --git a/tests/snapshots/add/build_prefer_existing_version.in/dependency/Cargo.toml b/tests/snapshots/add/build_prefer_existing_version.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/build_prefer_existing_version.in/dependency/src/lib.rs b/tests/snapshots/add/build_prefer_existing_version.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/build_prefer_existing_version.in/src/lib.rs b/tests/snapshots/add/build_prefer_existing_version.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/build_prefer_existing_version.out/Cargo.toml b/tests/snapshots/add/build_prefer_existing_version.out/Cargo.toml
new file mode 100644 (file)
index 0000000..123af6d
--- /dev/null
@@ -0,0 +1,12 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["one", "two"], registry = "alternative" }
+
+[build-dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "dependency", registry = "alternative" }
diff --git a/tests/snapshots/add/build_prefer_existing_version.out/dependency/Cargo.toml b/tests/snapshots/add/build_prefer_existing_version.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/build_prefer_existing_version.stderr b/tests/snapshots/add/build_prefer_existing_version.stderr
new file mode 100644 (file)
index 0000000..00f39cd
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to build-dependencies.
diff --git a/tests/snapshots/add/build_prefer_existing_version.stdout b/tests/snapshots/add/build_prefer_existing_version.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/change_rename_target.in/Cargo.toml b/tests/snapshots/add/change_rename_target.in/Cargo.toml
new file mode 100644 (file)
index 0000000..e81a76b
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+some-package = { package = "my-package1", version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/change_rename_target.in/src/lib.rs b/tests/snapshots/add/change_rename_target.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/change_rename_target.out/Cargo.toml b/tests/snapshots/add/change_rename_target.out/Cargo.toml
new file mode 100644 (file)
index 0000000..70cd318
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+some-package = { package = "my-package2", version = "99999.0.0", optional = true }
diff --git a/tests/snapshots/add/change_rename_target.stderr b/tests/snapshots/add/change_rename_target.stderr
new file mode 100644 (file)
index 0000000..674f626
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding my-package2 v99999.0.0 to optional dependencies.
diff --git a/tests/snapshots/add/change_rename_target.stdout b/tests/snapshots/add/change_rename_target.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/default_features.in b/tests/snapshots/add/default_features.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/default_features.out/Cargo.toml b/tests/snapshots/add/default_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/default_features.stderr b/tests/snapshots/add/default_features.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/default_features.stdout b/tests/snapshots/add/default_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/deprecated_default_features.in/Cargo.toml b/tests/snapshots/add/deprecated_default_features.in/Cargo.toml
new file mode 100644 (file)
index 0000000..c0fc374
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package = { version = "99999.0.0", default_features = false }
diff --git a/tests/snapshots/add/deprecated_default_features.in/src/lib.rs b/tests/snapshots/add/deprecated_default_features.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/deprecated_default_features.out/Cargo.toml b/tests/snapshots/add/deprecated_default_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..c0fc374
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package = { version = "99999.0.0", default_features = false }
diff --git a/tests/snapshots/add/deprecated_default_features.stderr b/tests/snapshots/add/deprecated_default_features.stderr
new file mode 100644 (file)
index 0000000..46d99d1
--- /dev/null
@@ -0,0 +1 @@
+error: Use of `default_features` in `my-package` is unsupported, please switch to `default-features`
diff --git a/tests/snapshots/add/deprecated_default_features.stdout b/tests/snapshots/add/deprecated_default_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/deprecated_section.in/Cargo.toml b/tests/snapshots/add/deprecated_section.in/Cargo.toml
new file mode 100644 (file)
index 0000000..a83d2c6
--- /dev/null
@@ -0,0 +1,11 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev_dependencies]
+my-package = "99999.0.0"
+
+[build_dependencies]
+my-package = "99999.0.0"
diff --git a/tests/snapshots/add/deprecated_section.in/src/lib.rs b/tests/snapshots/add/deprecated_section.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/deprecated_section.out/Cargo.toml b/tests/snapshots/add/deprecated_section.out/Cargo.toml
new file mode 100644 (file)
index 0000000..a83d2c6
--- /dev/null
@@ -0,0 +1,11 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev_dependencies]
+my-package = "99999.0.0"
+
+[build_dependencies]
+my-package = "99999.0.0"
diff --git a/tests/snapshots/add/deprecated_section.stderr b/tests/snapshots/add/deprecated_section.stderr
new file mode 100644 (file)
index 0000000..b3b9c10
--- /dev/null
@@ -0,0 +1 @@
+error: Deprecated dependency sections are unsupported: dev_dependencies, build_dependencies
diff --git a/tests/snapshots/add/deprecated_section.stdout b/tests/snapshots/add/deprecated_section.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/dev.in b/tests/snapshots/add/dev.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/dev.out/Cargo.toml b/tests/snapshots/add/dev.out/Cargo.toml
new file mode 100644 (file)
index 0000000..28d9e81
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev-dependencies]
+my-dev-package1 = "99999.0.0"
+my-dev-package2 = "99999.0.0"
diff --git a/tests/snapshots/add/dev.stderr b/tests/snapshots/add/dev.stderr
new file mode 100644 (file)
index 0000000..f8e187c
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-dev-package1 v99999.0.0 to dev-dependencies.
+      Adding my-dev-package2 v99999.0.0 to dev-dependencies.
diff --git a/tests/snapshots/add/dev.stdout b/tests/snapshots/add/dev.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/dev_build_conflict.in b/tests/snapshots/add/dev_build_conflict.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/dev_build_conflict.out/Cargo.toml b/tests/snapshots/add/dev_build_conflict.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/dev_build_conflict.stderr b/tests/snapshots/add/dev_build_conflict.stderr
new file mode 100644 (file)
index 0000000..7aee514
--- /dev/null
@@ -0,0 +1,8 @@
+error: The argument '--dev' cannot be used with '--build'
+
+USAGE:
+    cargo add [OPTIONS] <DEP>[@<VERSION>] ...
+    cargo add [OPTIONS] --path <PATH> ...
+    cargo add [OPTIONS] --git <URL> ...
+
+For more information try --help
diff --git a/tests/snapshots/add/dev_build_conflict.stdout b/tests/snapshots/add/dev_build_conflict.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/dev_prefer_existing_version.in/Cargo.toml b/tests/snapshots/add/dev_prefer_existing_version.in/Cargo.toml
new file mode 100644 (file)
index 0000000..6a6ac82
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["one", "two"], registry = "alternative" }
diff --git a/tests/snapshots/add/dev_prefer_existing_version.in/dependency/Cargo.toml b/tests/snapshots/add/dev_prefer_existing_version.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/dev_prefer_existing_version.in/dependency/src/lib.rs b/tests/snapshots/add/dev_prefer_existing_version.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/dev_prefer_existing_version.in/src/lib.rs b/tests/snapshots/add/dev_prefer_existing_version.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/dev_prefer_existing_version.out/Cargo.toml b/tests/snapshots/add/dev_prefer_existing_version.out/Cargo.toml
new file mode 100644 (file)
index 0000000..247f345
--- /dev/null
@@ -0,0 +1,12 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["one", "two"], registry = "alternative" }
+
+[dev-dependencies]
+cargo-list-test-fixture-dependency = { path = "dependency" }
diff --git a/tests/snapshots/add/dev_prefer_existing_version.out/dependency/Cargo.toml b/tests/snapshots/add/dev_prefer_existing_version.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/dev_prefer_existing_version.stderr b/tests/snapshots/add/dev_prefer_existing_version.stderr
new file mode 100644 (file)
index 0000000..d8093d6
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dev-dependencies.
diff --git a/tests/snapshots/add/dev_prefer_existing_version.stdout b/tests/snapshots/add/dev_prefer_existing_version.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/dry_run.in b/tests/snapshots/add/dry_run.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/dry_run.out/Cargo.toml b/tests/snapshots/add/dry_run.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/dry_run.stderr b/tests/snapshots/add/dry_run.stderr
new file mode 100644 (file)
index 0000000..c80dba9
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package v99999.0.0 to dependencies.
+warning: aborting add due to dry run
diff --git a/tests/snapshots/add/dry_run.stdout b/tests/snapshots/add/dry_run.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/features.in b/tests/snapshots/add/features.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/features.out/Cargo.toml b/tests/snapshots/add/features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..11419b2
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes"] }
diff --git a/tests/snapshots/add/features.stderr b/tests/snapshots/add/features.stderr
new file mode 100644 (file)
index 0000000..386f3db
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             + eyes
+             - ears
+             - mouth
+             - nose
diff --git a/tests/snapshots/add/features.stdout b/tests/snapshots/add/features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/features_empty.in b/tests/snapshots/add/features_empty.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/features_empty.out/Cargo.toml b/tests/snapshots/add/features_empty.out/Cargo.toml
new file mode 100644 (file)
index 0000000..79d735a
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = "99999.0.0"
diff --git a/tests/snapshots/add/features_empty.stderr b/tests/snapshots/add/features_empty.stderr
new file mode 100644 (file)
index 0000000..796b960
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             - ears
+             - eyes
+             - mouth
+             - nose
diff --git a/tests/snapshots/add/features_empty.stdout b/tests/snapshots/add/features_empty.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/features_multiple_occurrences.in b/tests/snapshots/add/features_multiple_occurrences.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/features_multiple_occurrences.out/Cargo.toml b/tests/snapshots/add/features_multiple_occurrences.out/Cargo.toml
new file mode 100644 (file)
index 0000000..0060d24
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes", "nose"] }
diff --git a/tests/snapshots/add/features_multiple_occurrences.stderr b/tests/snapshots/add/features_multiple_occurrences.stderr
new file mode 100644 (file)
index 0000000..6154590
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             + eyes
+             + nose
+             - ears
+             - mouth
diff --git a/tests/snapshots/add/features_multiple_occurrences.stdout b/tests/snapshots/add/features_multiple_occurrences.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/features_preserve.in/Cargo.toml b/tests/snapshots/add/features_preserve.in/Cargo.toml
new file mode 100644 (file)
index 0000000..11419b2
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes"] }
diff --git a/tests/snapshots/add/features_preserve.in/src/lib.rs b/tests/snapshots/add/features_preserve.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/features_preserve.out/Cargo.toml b/tests/snapshots/add/features_preserve.out/Cargo.toml
new file mode 100644 (file)
index 0000000..11419b2
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes"] }
diff --git a/tests/snapshots/add/features_preserve.stderr b/tests/snapshots/add/features_preserve.stderr
new file mode 100644 (file)
index 0000000..386f3db
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             + eyes
+             - ears
+             - mouth
+             - nose
diff --git a/tests/snapshots/add/features_preserve.stdout b/tests/snapshots/add/features_preserve.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/features_spaced_values.in b/tests/snapshots/add/features_spaced_values.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/features_spaced_values.out/Cargo.toml b/tests/snapshots/add/features_spaced_values.out/Cargo.toml
new file mode 100644 (file)
index 0000000..0060d24
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes", "nose"] }
diff --git a/tests/snapshots/add/features_spaced_values.stderr b/tests/snapshots/add/features_spaced_values.stderr
new file mode 100644 (file)
index 0000000..6154590
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             + eyes
+             + nose
+             - ears
+             - mouth
diff --git a/tests/snapshots/add/features_spaced_values.stdout b/tests/snapshots/add/features_spaced_values.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/features_unknown.in b/tests/snapshots/add/features_unknown.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/features_unknown.out/Cargo.toml b/tests/snapshots/add/features_unknown.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/features_unknown.stderr b/tests/snapshots/add/features_unknown.stderr
new file mode 100644 (file)
index 0000000..7f59af0
--- /dev/null
@@ -0,0 +1,9 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             + noze
+             - ears
+             - eyes
+             - mouth
+             - nose
+error: unrecognized features: ["noze"]
diff --git a/tests/snapshots/add/features_unknown.stdout b/tests/snapshots/add/features_unknown.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git.in b/tests/snapshots/add/git.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git.out/Cargo.toml b/tests/snapshots/add/git.out/Cargo.toml
new file mode 100644 (file)
index 0000000..7f2d2f1
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+git-package = { git = "[ROOTURL]/git-package", version = "0.3.0" }
diff --git a/tests/snapshots/add/git.stderr b/tests/snapshots/add/git.stderr
new file mode 100644 (file)
index 0000000..fdfb1a9
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+      Adding git-package (git) to dependencies.
diff --git a/tests/snapshots/add/git.stdout b/tests/snapshots/add/git.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_branch.in b/tests/snapshots/add/git_branch.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_branch.out/Cargo.toml b/tests/snapshots/add/git_branch.out/Cargo.toml
new file mode 100644 (file)
index 0000000..2eb2955
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+git-package = { git = "[ROOTURL]/git-package", branch = "dev", version = "0.3.0" }
diff --git a/tests/snapshots/add/git_branch.stderr b/tests/snapshots/add/git_branch.stderr
new file mode 100644 (file)
index 0000000..fdfb1a9
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+      Adding git-package (git) to dependencies.
diff --git a/tests/snapshots/add/git_branch.stdout b/tests/snapshots/add/git_branch.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_conflicts_namever.in b/tests/snapshots/add/git_conflicts_namever.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_conflicts_namever.out/Cargo.toml b/tests/snapshots/add/git_conflicts_namever.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/git_conflicts_namever.stderr b/tests/snapshots/add/git_conflicts_namever.stderr
new file mode 100644 (file)
index 0000000..207e0de
--- /dev/null
@@ -0,0 +1 @@
+error: cannot specify a git URL (`https://github.com/dcjanus/invalid`) with a version (`0.4.3`).
diff --git a/tests/snapshots/add/git_conflicts_namever.stdout b/tests/snapshots/add/git_conflicts_namever.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_dev.in b/tests/snapshots/add/git_dev.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_dev.out/Cargo.toml b/tests/snapshots/add/git_dev.out/Cargo.toml
new file mode 100644 (file)
index 0000000..ceb1317
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev-dependencies]
+git-package = { git = "[ROOTURL]/git-package" }
diff --git a/tests/snapshots/add/git_dev.stderr b/tests/snapshots/add/git_dev.stderr
new file mode 100644 (file)
index 0000000..4ba3162
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+      Adding git-package (git) to dev-dependencies.
diff --git a/tests/snapshots/add/git_dev.stdout b/tests/snapshots/add/git_dev.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_inferred_name.in b/tests/snapshots/add/git_inferred_name.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_inferred_name.out/Cargo.toml b/tests/snapshots/add/git_inferred_name.out/Cargo.toml
new file mode 100644 (file)
index 0000000..7f2d2f1
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+git-package = { git = "[ROOTURL]/git-package", version = "0.3.0" }
diff --git a/tests/snapshots/add/git_inferred_name.stderr b/tests/snapshots/add/git_inferred_name.stderr
new file mode 100644 (file)
index 0000000..48f251e
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating git repository `[ROOTURL]/git-package`
+    Updating git repository `[ROOTURL]/git-package`
+      Adding git-package (git) to dependencies.
diff --git a/tests/snapshots/add/git_inferred_name.stdout b/tests/snapshots/add/git_inferred_name.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_inferred_name_multiple.in b/tests/snapshots/add/git_inferred_name_multiple.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_inferred_name_multiple.out/Cargo.toml b/tests/snapshots/add/git_inferred_name_multiple.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/git_inferred_name_multiple.stderr b/tests/snapshots/add/git_inferred_name_multiple.stderr
new file mode 100644 (file)
index 0000000..829cc67
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+error: multiple packages found at `[ROOTURL]/git-package`: my-package1, my-package2
diff --git a/tests/snapshots/add/git_inferred_name_multiple.stdout b/tests/snapshots/add/git_inferred_name_multiple.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_multiple_names.in b/tests/snapshots/add/git_multiple_names.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_multiple_names.out/Cargo.toml b/tests/snapshots/add/git_multiple_names.out/Cargo.toml
new file mode 100644 (file)
index 0000000..ba9d3c5
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { git = "[ROOTURL]/git-package", version = "0.3.0" }
+my-package2 = { git = "[ROOTURL]/git-package", version = "0.3.0" }
diff --git a/tests/snapshots/add/git_multiple_names.stderr b/tests/snapshots/add/git_multiple_names.stderr
new file mode 100644 (file)
index 0000000..e677101
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating git repository `[ROOTURL]/git-package`
+      Adding my-package1 (git) to dependencies.
+      Adding my-package2 (git) to dependencies.
diff --git a/tests/snapshots/add/git_multiple_names.stdout b/tests/snapshots/add/git_multiple_names.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_normalized_name.in b/tests/snapshots/add/git_normalized_name.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_normalized_name.out/Cargo.toml b/tests/snapshots/add/git_normalized_name.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/git_normalized_name.stderr b/tests/snapshots/add/git_normalized_name.stderr
new file mode 100644 (file)
index 0000000..fedf828
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+error: the crate `git_package@[ROOTURL]/git-package` could not be found at `[ROOTURL]/git-package`
diff --git a/tests/snapshots/add/git_normalized_name.stdout b/tests/snapshots/add/git_normalized_name.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_registry.in/Cargo.toml b/tests/snapshots/add/git_registry.in/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/git_registry.in/src/lib.rs b/tests/snapshots/add/git_registry.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_registry.out/Cargo.toml b/tests/snapshots/add/git_registry.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3773d1c
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+versioned-package = { git = "[ROOTURL]/versioned-package", version = "0.3.0", registry = "alternative" }
diff --git a/tests/snapshots/add/git_registry.stderr b/tests/snapshots/add/git_registry.stderr
new file mode 100644 (file)
index 0000000..548debf
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/versioned-package`
+      Adding versioned-package (git) to dependencies.
diff --git a/tests/snapshots/add/git_registry.stdout b/tests/snapshots/add/git_registry.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_rev.in b/tests/snapshots/add/git_rev.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_rev.out/Cargo.toml b/tests/snapshots/add/git_rev.out/Cargo.toml
new file mode 100644 (file)
index 0000000..efc00a0
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+git-package = { git = "[ROOTURL]/git-package", rev = "[..]", version = "0.3.0" }
diff --git a/tests/snapshots/add/git_rev.stderr b/tests/snapshots/add/git_rev.stderr
new file mode 100644 (file)
index 0000000..fdfb1a9
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+      Adding git-package (git) to dependencies.
diff --git a/tests/snapshots/add/git_rev.stdout b/tests/snapshots/add/git_rev.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/git_tag.in b/tests/snapshots/add/git_tag.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/git_tag.out/Cargo.toml b/tests/snapshots/add/git_tag.out/Cargo.toml
new file mode 100644 (file)
index 0000000..233f26e
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+git-package = { git = "[ROOTURL]/git-package", tag = "v1.0.0", version = "0.3.0" }
diff --git a/tests/snapshots/add/git_tag.stderr b/tests/snapshots/add/git_tag.stderr
new file mode 100644 (file)
index 0000000..fdfb1a9
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+      Adding git-package (git) to dependencies.
diff --git a/tests/snapshots/add/git_tag.stdout b/tests/snapshots/add/git_tag.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/infer_prerelease.in b/tests/snapshots/add/infer_prerelease.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/infer_prerelease.out/Cargo.toml b/tests/snapshots/add/infer_prerelease.out/Cargo.toml
new file mode 100644 (file)
index 0000000..4a86322
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+prerelease_only = "0.2.0-alpha.1"
diff --git a/tests/snapshots/add/infer_prerelease.stderr b/tests/snapshots/add/infer_prerelease.stderr
new file mode 100644 (file)
index 0000000..0696d8f
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding prerelease_only v0.2.0-alpha.1 to dependencies.
diff --git a/tests/snapshots/add/infer_prerelease.stdout b/tests/snapshots/add/infer_prerelease.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_arg.in b/tests/snapshots/add/invalid_arg.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_arg.out/Cargo.toml b/tests/snapshots/add/invalid_arg.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_arg.stderr b/tests/snapshots/add/invalid_arg.stderr
new file mode 100644 (file)
index 0000000..d994681
--- /dev/null
@@ -0,0 +1,10 @@
+error: Found argument '--flag' which wasn't expected, or isn't valid in this context
+
+       If you tried to supply `--flag` as a value rather than a flag, use `-- --flag`
+
+USAGE:
+    cargo add [OPTIONS] <DEP>[@<VERSION>] ...
+    cargo add [OPTIONS] --path <PATH> ...
+    cargo add [OPTIONS] --git <URL> ...
+
+For more information try --help
diff --git a/tests/snapshots/add/invalid_arg.stdout b/tests/snapshots/add/invalid_arg.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_git_external.in b/tests/snapshots/add/invalid_git_external.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_git_external.out/Cargo.toml b/tests/snapshots/add/invalid_git_external.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_git_external.stderr b/tests/snapshots/add/invalid_git_external.stderr
new file mode 100644 (file)
index 0000000..1865630
--- /dev/null
@@ -0,0 +1,12 @@
+    Updating git repository `[ROOTURL]/case/does-not-exist/`
+...
+error: failed to load source for dependency `fake-git`
+
+Caused by:
+  Unable to update [ROOTURL]/case/does-not-exist/
+
+Caused by:
+  failed to clone into: [ROOT]/home/.cargo/git/db/does-not-exist-[..]
+
+Caused by:
+...
diff --git a/tests/snapshots/add/invalid_git_external.stdout b/tests/snapshots/add/invalid_git_external.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_git_name.in b/tests/snapshots/add/invalid_git_name.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_git_name.out/Cargo.toml b/tests/snapshots/add/invalid_git_name.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_git_name.stderr b/tests/snapshots/add/invalid_git_name.stderr
new file mode 100644 (file)
index 0000000..68fc4e4
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/git-package`
+error: the crate `not-in-git@[ROOTURL]/git-package` could not be found at `[ROOTURL]/git-package`
diff --git a/tests/snapshots/add/invalid_git_name.stdout b/tests/snapshots/add/invalid_git_name.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_manifest.in/Cargo.toml b/tests/snapshots/add/invalid_manifest.in/Cargo.toml
new file mode 100644 (file)
index 0000000..94ee959
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "manifest-invalid-test-fixture"
+version = "0.1.0"
+
+[invalid-section]
+key = invalid-value
diff --git a/tests/snapshots/add/invalid_manifest.in/src/lib.rs b/tests/snapshots/add/invalid_manifest.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_manifest.out/Cargo.toml b/tests/snapshots/add/invalid_manifest.out/Cargo.toml
new file mode 100644 (file)
index 0000000..94ee959
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "manifest-invalid-test-fixture"
+version = "0.1.0"
+
+[invalid-section]
+key = invalid-value
diff --git a/tests/snapshots/add/invalid_manifest.stderr b/tests/snapshots/add/invalid_manifest.stderr
new file mode 100644 (file)
index 0000000..83bfc5e
--- /dev/null
@@ -0,0 +1,11 @@
+error: failed to parse manifest at `[ROOT]/case/Cargo.toml`
+
+Caused by:
+  could not parse input as TOML
+
+Caused by:
+  TOML parse error at line 8, column 7
+    |
+  8 | key = invalid-value
+    |       ^
+  Unexpected `v`
diff --git a/tests/snapshots/add/invalid_manifest.stdout b/tests/snapshots/add/invalid_manifest.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_name_external.in b/tests/snapshots/add/invalid_name_external.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_name_external.out/Cargo.toml b/tests/snapshots/add/invalid_name_external.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_name_external.stderr b/tests/snapshots/add/invalid_name_external.stderr
new file mode 100644 (file)
index 0000000..5e574ce
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+error: the crate `lets_hope_nobody_ever_publishes_this_crate` could not be found in registry index.
diff --git a/tests/snapshots/add/invalid_name_external.stdout b/tests/snapshots/add/invalid_name_external.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_path.in b/tests/snapshots/add/invalid_path.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_path.out/Cargo.toml b/tests/snapshots/add/invalid_path.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_path.stderr b/tests/snapshots/add/invalid_path.stderr
new file mode 100644 (file)
index 0000000..f6c4043
--- /dev/null
@@ -0,0 +1,10 @@
+error: failed to load source for dependency `cargo-list-test-fixture`
+
+Caused by:
+  Unable to update [ROOT]/case/tests/fixtures/local
+
+Caused by:
+  failed to read `[ROOT]/case/tests/fixtures/local/Cargo.toml`
+
+Caused by:
+  [..]
diff --git a/tests/snapshots/add/invalid_path.stdout b/tests/snapshots/add/invalid_path.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_path_name.in/dependency/Cargo.toml b/tests/snapshots/add/invalid_path_name.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_path_name.in/dependency/src/lib.rs b/tests/snapshots/add/invalid_path_name.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_path_name.in/primary/Cargo.toml b/tests/snapshots/add/invalid_path_name.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_path_name.in/primary/src/lib.rs b/tests/snapshots/add/invalid_path_name.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_path_name.out/dependency/Cargo.toml b/tests/snapshots/add/invalid_path_name.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_path_name.out/primary/Cargo.toml b/tests/snapshots/add/invalid_path_name.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_path_name.stderr b/tests/snapshots/add/invalid_path_name.stderr
new file mode 100644 (file)
index 0000000..b35ea82
--- /dev/null
@@ -0,0 +1 @@
+error: the crate `not-at-path@[ROOT]/case/dependency` could not be found at `[ROOT]/case/dependency`
diff --git a/tests/snapshots/add/invalid_path_name.stdout b/tests/snapshots/add/invalid_path_name.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_path_self.in b/tests/snapshots/add/invalid_path_self.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_path_self.out/Cargo.toml b/tests/snapshots/add/invalid_path_self.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_path_self.stderr b/tests/snapshots/add/invalid_path_self.stderr
new file mode 100644 (file)
index 0000000..62a25db
--- /dev/null
@@ -0,0 +1,2 @@
+      Adding cargo-list-test-fixture (local) to dependencies.
+error: cannot add `cargo-list-test-fixture` as a dependency to itself
diff --git a/tests/snapshots/add/invalid_path_self.stdout b/tests/snapshots/add/invalid_path_self.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_target_empty.in b/tests/snapshots/add/invalid_target_empty.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_target_empty.out/Cargo.toml b/tests/snapshots/add/invalid_target_empty.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_target_empty.stderr b/tests/snapshots/add/invalid_target_empty.stderr
new file mode 100644 (file)
index 0000000..44aad05
--- /dev/null
@@ -0,0 +1,8 @@
+error: The argument '--target <TARGET>' requires a value but none was supplied
+
+USAGE:
+    cargo add [OPTIONS] <DEP>[@<VERSION>] ...
+    cargo add [OPTIONS] --path <PATH> ...
+    cargo add [OPTIONS] --git <URL> ...
+
+For more information try --help
diff --git a/tests/snapshots/add/invalid_target_empty.stdout b/tests/snapshots/add/invalid_target_empty.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/invalid_vers.in b/tests/snapshots/add/invalid_vers.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/invalid_vers.out/Cargo.toml b/tests/snapshots/add/invalid_vers.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/invalid_vers.stderr b/tests/snapshots/add/invalid_vers.stderr
new file mode 100644 (file)
index 0000000..13a1103
--- /dev/null
@@ -0,0 +1,4 @@
+error: invalid version requirement `invalid version string`
+
+Caused by:
+  unexpected character 'i' while parsing major version number
diff --git a/tests/snapshots/add/invalid_vers.stdout b/tests/snapshots/add/invalid_vers.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features.in b/tests/snapshots/add/list_features.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/list_features.out/Cargo.toml b/tests/snapshots/add/list_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..79d735a
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = "99999.0.0"
diff --git a/tests/snapshots/add/list_features.stderr b/tests/snapshots/add/list_features.stderr
new file mode 100644 (file)
index 0000000..796b960
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             - ears
+             - eyes
+             - mouth
+             - nose
diff --git a/tests/snapshots/add/list_features.stdout b/tests/snapshots/add/list_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path.in/Cargo.toml b/tests/snapshots/add/list_features_path.in/Cargo.toml
new file mode 100644 (file)
index 0000000..299859e
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency", "optional"]
diff --git a/tests/snapshots/add/list_features_path.in/dependency/Cargo.toml b/tests/snapshots/add/list_features_path.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..34157f4
--- /dev/null
@@ -0,0 +1,14 @@
+[package]
+name = "your-face"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
+optional-dependency = { path = "../optional", optional = true }
+
+[features]
+default = ["mouth"]
+nose = []
+mouth = ["nose"]
+eyes = []
diff --git a/tests/snapshots/add/list_features_path.in/dependency/src/lib.rs b/tests/snapshots/add/list_features_path.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path.in/optional/Cargo.toml b/tests/snapshots/add/list_features_path.in/optional/Cargo.toml
new file mode 100644 (file)
index 0000000..0216dba
--- /dev/null
@@ -0,0 +1,7 @@
+[package]
+name = "optional-dep"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
diff --git a/tests/snapshots/add/list_features_path.in/optional/src/lib.rs b/tests/snapshots/add/list_features_path.in/optional/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path.in/primary/Cargo.toml b/tests/snapshots/add/list_features_path.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/list_features_path.in/primary/src/lib.rs b/tests/snapshots/add/list_features_path.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path.out/Cargo.toml b/tests/snapshots/add/list_features_path.out/Cargo.toml
new file mode 100644 (file)
index 0000000..299859e
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency", "optional"]
diff --git a/tests/snapshots/add/list_features_path.out/dependency/Cargo.toml b/tests/snapshots/add/list_features_path.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..34157f4
--- /dev/null
@@ -0,0 +1,14 @@
+[package]
+name = "your-face"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
+optional-dependency = { path = "../optional", optional = true }
+
+[features]
+default = ["mouth"]
+nose = []
+mouth = ["nose"]
+eyes = []
diff --git a/tests/snapshots/add/list_features_path.out/primary/Cargo.toml b/tests/snapshots/add/list_features_path.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..2461d09
--- /dev/null
@@ -0,0 +1,6 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.1.3", path = "../dependency" }
diff --git a/tests/snapshots/add/list_features_path.stderr b/tests/snapshots/add/list_features_path.stderr
new file mode 100644 (file)
index 0000000..2737804
--- /dev/null
@@ -0,0 +1,6 @@
+      Adding your-face (local) to dependencies.
+             Features:
+             + mouth
+             + nose
+             - eyes
+             - optional-dependency
diff --git a/tests/snapshots/add/list_features_path.stdout b/tests/snapshots/add/list_features_path.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path_no_default.in/Cargo.toml b/tests/snapshots/add/list_features_path_no_default.in/Cargo.toml
new file mode 100644 (file)
index 0000000..299859e
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency", "optional"]
diff --git a/tests/snapshots/add/list_features_path_no_default.in/dependency/Cargo.toml b/tests/snapshots/add/list_features_path_no_default.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..34157f4
--- /dev/null
@@ -0,0 +1,14 @@
+[package]
+name = "your-face"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
+optional-dependency = { path = "../optional", optional = true }
+
+[features]
+default = ["mouth"]
+nose = []
+mouth = ["nose"]
+eyes = []
diff --git a/tests/snapshots/add/list_features_path_no_default.in/dependency/src/lib.rs b/tests/snapshots/add/list_features_path_no_default.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path_no_default.in/optional/Cargo.toml b/tests/snapshots/add/list_features_path_no_default.in/optional/Cargo.toml
new file mode 100644 (file)
index 0000000..0216dba
--- /dev/null
@@ -0,0 +1,7 @@
+[package]
+name = "optional-dep"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
diff --git a/tests/snapshots/add/list_features_path_no_default.in/optional/src/lib.rs b/tests/snapshots/add/list_features_path_no_default.in/optional/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path_no_default.in/primary/Cargo.toml b/tests/snapshots/add/list_features_path_no_default.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/list_features_path_no_default.in/primary/src/lib.rs b/tests/snapshots/add/list_features_path_no_default.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/list_features_path_no_default.out/Cargo.toml b/tests/snapshots/add/list_features_path_no_default.out/Cargo.toml
new file mode 100644 (file)
index 0000000..299859e
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency", "optional"]
diff --git a/tests/snapshots/add/list_features_path_no_default.out/dependency/Cargo.toml b/tests/snapshots/add/list_features_path_no_default.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..34157f4
--- /dev/null
@@ -0,0 +1,14 @@
+[package]
+name = "your-face"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
+optional-dependency = { path = "../optional", optional = true }
+
+[features]
+default = ["mouth"]
+nose = []
+mouth = ["nose"]
+eyes = []
diff --git a/tests/snapshots/add/list_features_path_no_default.out/primary/Cargo.toml b/tests/snapshots/add/list_features_path_no_default.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..0b0400d
--- /dev/null
@@ -0,0 +1,6 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.1.3", path = "../dependency", default-features = false }
diff --git a/tests/snapshots/add/list_features_path_no_default.stderr b/tests/snapshots/add/list_features_path_no_default.stderr
new file mode 100644 (file)
index 0000000..cc6c834
--- /dev/null
@@ -0,0 +1,6 @@
+      Adding your-face (local) to dependencies.
+             Features:
+             - eyes
+             - mouth
+             - nose
+             - optional-dependency
diff --git a/tests/snapshots/add/list_features_path_no_default.stdout b/tests/snapshots/add/list_features_path_no_default.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/manifest_path_package.in/Cargo.toml b/tests/snapshots/add/manifest_path_package.in/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/manifest_path_package.in/dependency/Cargo.toml b/tests/snapshots/add/manifest_path_package.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/manifest_path_package.in/dependency/src/lib.rs b/tests/snapshots/add/manifest_path_package.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/manifest_path_package.in/primary/Cargo.toml b/tests/snapshots/add/manifest_path_package.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/manifest_path_package.in/primary/src/lib.rs b/tests/snapshots/add/manifest_path_package.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/manifest_path_package.out/Cargo.toml b/tests/snapshots/add/manifest_path_package.out/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/manifest_path_package.out/dependency/Cargo.toml b/tests/snapshots/add/manifest_path_package.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/manifest_path_package.out/primary/Cargo.toml b/tests/snapshots/add/manifest_path_package.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..a693df5
--- /dev/null
@@ -0,0 +1,6 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "../dependency" }
diff --git a/tests/snapshots/add/manifest_path_package.stderr b/tests/snapshots/add/manifest_path_package.stderr
new file mode 100644 (file)
index 0000000..8109d3c
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dependencies.
diff --git a/tests/snapshots/add/manifest_path_package.stdout b/tests/snapshots/add/manifest_path_package.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/multiple_conflicts_with_features.in b/tests/snapshots/add/multiple_conflicts_with_features.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/multiple_conflicts_with_features.out/Cargo.toml b/tests/snapshots/add/multiple_conflicts_with_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/multiple_conflicts_with_features.stderr b/tests/snapshots/add/multiple_conflicts_with_features.stderr
new file mode 100644 (file)
index 0000000..60a6961
--- /dev/null
@@ -0,0 +1 @@
+error: feature `nose` must be qualified by the dependency its being activated for, like `my-package1/nose`, `your-face/nose`
diff --git a/tests/snapshots/add/multiple_conflicts_with_features.stdout b/tests/snapshots/add/multiple_conflicts_with_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/multiple_conflicts_with_rename.in b/tests/snapshots/add/multiple_conflicts_with_rename.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/multiple_conflicts_with_rename.out/Cargo.toml b/tests/snapshots/add/multiple_conflicts_with_rename.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/multiple_conflicts_with_rename.stderr b/tests/snapshots/add/multiple_conflicts_with_rename.stderr
new file mode 100644 (file)
index 0000000..e83250e
--- /dev/null
@@ -0,0 +1 @@
+error: cannot specify multiple crates with `--rename`
diff --git a/tests/snapshots/add/multiple_conflicts_with_rename.stdout b/tests/snapshots/add/multiple_conflicts_with_rename.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/namever.in b/tests/snapshots/add/namever.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/namever.out/Cargo.toml b/tests/snapshots/add/namever.out/Cargo.toml
new file mode 100644 (file)
index 0000000..1704d34
--- /dev/null
@@ -0,0 +1,10 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package = "99999.0.0"
+my-package1 = ">=0.1.1"
+my-package2 = "0.2.3"
diff --git a/tests/snapshots/add/namever.stderr b/tests/snapshots/add/namever.stderr
new file mode 100644 (file)
index 0000000..17be8f9
--- /dev/null
@@ -0,0 +1,4 @@
+    Updating `dummy-registry` index
+      Adding my-package1 >=0.1.1 to dependencies.
+      Adding my-package2 v0.2.3 to dependencies.
+      Adding my-package v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/namever.stdout b/tests/snapshots/add/namever.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/no_args.in b/tests/snapshots/add/no_args.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/no_args.out/Cargo.toml b/tests/snapshots/add/no_args.out/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/no_args.stderr b/tests/snapshots/add/no_args.stderr
new file mode 100644 (file)
index 0000000..a046b3f
--- /dev/null
@@ -0,0 +1,9 @@
+error: The following required arguments were not provided:
+    <DEP_ID|--path <PATH>|--git <URI>>
+
+USAGE:
+    cargo add [OPTIONS] <DEP>[@<VERSION>] ...
+    cargo add [OPTIONS] --path <PATH> ...
+    cargo add [OPTIONS] --git <URL> ...
+
+For more information try --help
diff --git a/tests/snapshots/add/no_args.stdout b/tests/snapshots/add/no_args.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/no_default_features.in b/tests/snapshots/add/no_default_features.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/no_default_features.out/Cargo.toml b/tests/snapshots/add/no_default_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..ddd02b1
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", default-features = false }
+my-package2 = { version = "0.4.1", default-features = false }
diff --git a/tests/snapshots/add/no_default_features.stderr b/tests/snapshots/add/no_default_features.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/no_default_features.stdout b/tests/snapshots/add/no_default_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/no_optional.in b/tests/snapshots/add/no_optional.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/no_optional.out/Cargo.toml b/tests/snapshots/add/no_optional.out/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/no_optional.stderr b/tests/snapshots/add/no_optional.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/no_optional.stdout b/tests/snapshots/add/no_optional.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/optional.in b/tests/snapshots/add/optional.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/optional.out/Cargo.toml b/tests/snapshots/add/optional.out/Cargo.toml
new file mode 100644 (file)
index 0000000..eda5445
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", optional = true }
+my-package2 = { version = "0.4.1", optional = true }
diff --git a/tests/snapshots/add/optional.stderr b/tests/snapshots/add/optional.stderr
new file mode 100644 (file)
index 0000000..8cf4812
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to optional dependencies.
+      Adding my-package2 v0.4.1 to optional dependencies.
diff --git a/tests/snapshots/add/optional.stdout b/tests/snapshots/add/optional.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_default_features.in/Cargo.toml b/tests/snapshots/add/overwrite_default_features.in/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/overwrite_default_features.in/src/lib.rs b/tests/snapshots/add/overwrite_default_features.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_default_features.out/Cargo.toml b/tests/snapshots/add/overwrite_default_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/overwrite_default_features.stderr b/tests/snapshots/add/overwrite_default_features.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/overwrite_default_features.stdout b/tests/snapshots/add/overwrite_default_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_default_features_with_no_default_features.in/Cargo.toml b/tests/snapshots/add/overwrite_default_features_with_no_default_features.in/Cargo.toml
new file mode 100644 (file)
index 0000000..73f56a7
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", default-features = true }
+my-package2 = { version = "0.4.1", default-features = true }
diff --git a/tests/snapshots/add/overwrite_default_features_with_no_default_features.in/src/lib.rs b/tests/snapshots/add/overwrite_default_features_with_no_default_features.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_default_features_with_no_default_features.out/Cargo.toml b/tests/snapshots/add/overwrite_default_features_with_no_default_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..ddd02b1
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", default-features = false }
+my-package2 = { version = "0.4.1", default-features = false }
diff --git a/tests/snapshots/add/overwrite_default_features_with_no_default_features.stderr b/tests/snapshots/add/overwrite_default_features_with_no_default_features.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/overwrite_default_features_with_no_default_features.stdout b/tests/snapshots/add/overwrite_default_features_with_no_default_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_features.in/Cargo.toml b/tests/snapshots/add/overwrite_features.in/Cargo.toml
new file mode 100644 (file)
index 0000000..11419b2
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes"] }
diff --git a/tests/snapshots/add/overwrite_features.in/src/lib.rs b/tests/snapshots/add/overwrite_features.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_features.out/Cargo.toml b/tests/snapshots/add/overwrite_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..0060d24
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes", "nose"] }
diff --git a/tests/snapshots/add/overwrite_features.stderr b/tests/snapshots/add/overwrite_features.stderr
new file mode 100644 (file)
index 0000000..6154590
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             + eyes
+             + nose
+             - ears
+             - mouth
diff --git a/tests/snapshots/add/overwrite_features.stdout b/tests/snapshots/add/overwrite_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_git_with_path.in/dependency/Cargo.toml b/tests/snapshots/add/overwrite_git_with_path.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/overwrite_git_with_path.in/dependency/src/lib.rs b/tests/snapshots/add/overwrite_git_with_path.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_git_with_path.in/primary/Cargo.toml b/tests/snapshots/add/overwrite_git_with_path.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..6cb4d6a
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { git = "git://git.git", branch = "main", optional = true }
diff --git a/tests/snapshots/add/overwrite_git_with_path.in/primary/src/lib.rs b/tests/snapshots/add/overwrite_git_with_path.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_git_with_path.out/dependency/Cargo.toml b/tests/snapshots/add/overwrite_git_with_path.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/overwrite_git_with_path.out/primary/Cargo.toml b/tests/snapshots/add/overwrite_git_with_path.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..ad12054
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { optional = true, path = "../dependency", version = "0.0.0" }
diff --git a/tests/snapshots/add/overwrite_git_with_path.stderr b/tests/snapshots/add/overwrite_git_with_path.stderr
new file mode 100644 (file)
index 0000000..98abcfc
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to optional dependencies.
diff --git a/tests/snapshots/add/overwrite_git_with_path.stdout b/tests/snapshots/add/overwrite_git_with_path.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_inline_features.in/Cargo.toml b/tests/snapshots/add/overwrite_inline_features.in/Cargo.toml
new file mode 100644 (file)
index 0000000..11419b2
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "99999.0.0", features = ["eyes"] }
diff --git a/tests/snapshots/add/overwrite_inline_features.in/src/lib.rs b/tests/snapshots/add/overwrite_inline_features.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_inline_features.out/Cargo.toml b/tests/snapshots/add/overwrite_inline_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..8e9579d
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+unrelateed-crate = "99999.0.0"
+your-face = { version = "99999.0.0", features = ["eyes", "nose", "mouth", "ears"] }
diff --git a/tests/snapshots/add/overwrite_inline_features.stderr b/tests/snapshots/add/overwrite_inline_features.stderr
new file mode 100644 (file)
index 0000000..a686cba
--- /dev/null
@@ -0,0 +1,8 @@
+    Updating `dummy-registry` index
+      Adding unrelateed-crate v99999.0.0 to dependencies.
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             + ears
+             + eyes
+             + mouth
+             + nose
diff --git a/tests/snapshots/add/overwrite_inline_features.stdout b/tests/snapshots/add/overwrite_inline_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.in/Cargo.toml b/tests/snapshots/add/overwrite_name_dev_noop.in/Cargo.toml
new file mode 100644 (file)
index 0000000..b69b5d3
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev-dependencies]
+your-face = { version = "0.0.0", path = "dependency", default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.in/dependency/Cargo.toml b/tests/snapshots/add/overwrite_name_dev_noop.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..8243797
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.in/dependency/src/lib.rs b/tests/snapshots/add/overwrite_name_dev_noop.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.in/src/lib.rs b/tests/snapshots/add/overwrite_name_dev_noop.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.out/Cargo.toml b/tests/snapshots/add/overwrite_name_dev_noop.out/Cargo.toml
new file mode 100644 (file)
index 0000000..b69b5d3
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev-dependencies]
+your-face = { version = "0.0.0", path = "dependency", default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.out/dependency/Cargo.toml b/tests/snapshots/add/overwrite_name_dev_noop.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..8243797
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.stderr b/tests/snapshots/add/overwrite_name_dev_noop.stderr
new file mode 100644 (file)
index 0000000..2fe3f6a
--- /dev/null
@@ -0,0 +1,4 @@
+      Adding your-face (local) to dev-dependencies.
+             Features:
+             + mouth
+             + nose
diff --git a/tests/snapshots/add/overwrite_name_dev_noop.stdout b/tests/snapshots/add/overwrite_name_dev_noop.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_name_noop.in/Cargo.toml b/tests/snapshots/add/overwrite_name_noop.in/Cargo.toml
new file mode 100644 (file)
index 0000000..bbaf4f5
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/tests/snapshots/add/overwrite_name_noop.in/dependency/Cargo.toml b/tests/snapshots/add/overwrite_name_noop.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..8243797
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/tests/snapshots/add/overwrite_name_noop.in/dependency/src/lib.rs b/tests/snapshots/add/overwrite_name_noop.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_name_noop.in/src/lib.rs b/tests/snapshots/add/overwrite_name_noop.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_name_noop.out/Cargo.toml b/tests/snapshots/add/overwrite_name_noop.out/Cargo.toml
new file mode 100644 (file)
index 0000000..bbaf4f5
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/tests/snapshots/add/overwrite_name_noop.out/dependency/Cargo.toml b/tests/snapshots/add/overwrite_name_noop.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..8243797
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/tests/snapshots/add/overwrite_name_noop.stderr b/tests/snapshots/add/overwrite_name_noop.stderr
new file mode 100644 (file)
index 0000000..2f0b90d
--- /dev/null
@@ -0,0 +1,4 @@
+      Adding your-face (local) to optional dependencies.
+             Features:
+             + mouth
+             + nose
diff --git a/tests/snapshots/add/overwrite_name_noop.stdout b/tests/snapshots/add/overwrite_name_noop.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_default_features.in/Cargo.toml b/tests/snapshots/add/overwrite_no_default_features.in/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/overwrite_no_default_features.in/src/lib.rs b/tests/snapshots/add/overwrite_no_default_features.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_default_features.out/Cargo.toml b/tests/snapshots/add/overwrite_no_default_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..ddd02b1
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", default-features = false }
+my-package2 = { version = "0.4.1", default-features = false }
diff --git a/tests/snapshots/add/overwrite_no_default_features.stderr b/tests/snapshots/add/overwrite_no_default_features.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/overwrite_no_default_features.stdout b/tests/snapshots/add/overwrite_no_default_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_default_features_with_default_features.in/Cargo.toml b/tests/snapshots/add/overwrite_no_default_features_with_default_features.in/Cargo.toml
new file mode 100644 (file)
index 0000000..ddd02b1
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", default-features = false }
+my-package2 = { version = "0.4.1", default-features = false }
diff --git a/tests/snapshots/add/overwrite_no_default_features_with_default_features.in/src/lib.rs b/tests/snapshots/add/overwrite_no_default_features_with_default_features.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_default_features_with_default_features.out/Cargo.toml b/tests/snapshots/add/overwrite_no_default_features_with_default_features.out/Cargo.toml
new file mode 100644 (file)
index 0000000..b9e8985
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0" }
+my-package2 = { version = "0.4.1" }
diff --git a/tests/snapshots/add/overwrite_no_default_features_with_default_features.stderr b/tests/snapshots/add/overwrite_no_default_features_with_default_features.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/overwrite_no_default_features_with_default_features.stdout b/tests/snapshots/add/overwrite_no_default_features_with_default_features.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_optional.in/Cargo.toml b/tests/snapshots/add/overwrite_no_optional.in/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/overwrite_no_optional.in/src/lib.rs b/tests/snapshots/add/overwrite_no_optional.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_optional.out/Cargo.toml b/tests/snapshots/add/overwrite_no_optional.out/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/overwrite_no_optional.stderr b/tests/snapshots/add/overwrite_no_optional.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/overwrite_no_optional.stdout b/tests/snapshots/add/overwrite_no_optional.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_optional_with_optional.in/Cargo.toml b/tests/snapshots/add/overwrite_no_optional_with_optional.in/Cargo.toml
new file mode 100644 (file)
index 0000000..8cd2616
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", optional = false }
+my-package2 = { version = "0.4.1", optional = false }
diff --git a/tests/snapshots/add/overwrite_no_optional_with_optional.in/src/lib.rs b/tests/snapshots/add/overwrite_no_optional_with_optional.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_no_optional_with_optional.out/Cargo.toml b/tests/snapshots/add/overwrite_no_optional_with_optional.out/Cargo.toml
new file mode 100644 (file)
index 0000000..eda5445
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", optional = true }
+my-package2 = { version = "0.4.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_no_optional_with_optional.stderr b/tests/snapshots/add/overwrite_no_optional_with_optional.stderr
new file mode 100644 (file)
index 0000000..8cf4812
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to optional dependencies.
+      Adding my-package2 v0.4.1 to optional dependencies.
diff --git a/tests/snapshots/add/overwrite_no_optional_with_optional.stdout b/tests/snapshots/add/overwrite_no_optional_with_optional.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_optional.in/Cargo.toml b/tests/snapshots/add/overwrite_optional.in/Cargo.toml
new file mode 100644 (file)
index 0000000..c5e0178
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "0.4.1"
diff --git a/tests/snapshots/add/overwrite_optional.in/src/lib.rs b/tests/snapshots/add/overwrite_optional.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_optional.out/Cargo.toml b/tests/snapshots/add/overwrite_optional.out/Cargo.toml
new file mode 100644 (file)
index 0000000..eda5445
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", optional = true }
+my-package2 = { version = "0.4.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_optional.stderr b/tests/snapshots/add/overwrite_optional.stderr
new file mode 100644 (file)
index 0000000..8cf4812
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to optional dependencies.
+      Adding my-package2 v0.4.1 to optional dependencies.
diff --git a/tests/snapshots/add/overwrite_optional.stdout b/tests/snapshots/add/overwrite_optional.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_optional_with_no_optional.in/Cargo.toml b/tests/snapshots/add/overwrite_optional_with_no_optional.in/Cargo.toml
new file mode 100644 (file)
index 0000000..195d5c7
--- /dev/null
@@ -0,0 +1,13 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[features]
+default = ["my-package1"]
+other = ["my-package1/nose"]
+
+[dependencies]
+my-package1 = { version = "99999.0.0", optional = true }
+my-package2 = { version = "0.4.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_optional_with_no_optional.in/src/lib.rs b/tests/snapshots/add/overwrite_optional_with_no_optional.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_optional_with_no_optional.out/Cargo.toml b/tests/snapshots/add/overwrite_optional_with_no_optional.out/Cargo.toml
new file mode 100644 (file)
index 0000000..6301685
--- /dev/null
@@ -0,0 +1,13 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[features]
+default = []
+other = ["my-package1/nose"]
+
+[dependencies]
+my-package1 = { version = "99999.0.0" }
+my-package2 = { version = "0.4.1" }
diff --git a/tests/snapshots/add/overwrite_optional_with_no_optional.stderr b/tests/snapshots/add/overwrite_optional_with_no_optional.stderr
new file mode 100644 (file)
index 0000000..fb8d490
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v0.4.1 to dependencies.
diff --git a/tests/snapshots/add/overwrite_optional_with_no_optional.stdout b/tests/snapshots/add/overwrite_optional_with_no_optional.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_path_noop.in/Cargo.toml b/tests/snapshots/add/overwrite_path_noop.in/Cargo.toml
new file mode 100644 (file)
index 0000000..bbaf4f5
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/tests/snapshots/add/overwrite_path_noop.in/dependency/Cargo.toml b/tests/snapshots/add/overwrite_path_noop.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..8243797
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/tests/snapshots/add/overwrite_path_noop.in/dependency/src/lib.rs b/tests/snapshots/add/overwrite_path_noop.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_path_noop.in/src/lib.rs b/tests/snapshots/add/overwrite_path_noop.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_path_noop.out/Cargo.toml b/tests/snapshots/add/overwrite_path_noop.out/Cargo.toml
new file mode 100644 (file)
index 0000000..bbaf4f5
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/tests/snapshots/add/overwrite_path_noop.out/dependency/Cargo.toml b/tests/snapshots/add/overwrite_path_noop.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..8243797
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/tests/snapshots/add/overwrite_path_noop.stderr b/tests/snapshots/add/overwrite_path_noop.stderr
new file mode 100644 (file)
index 0000000..2f0b90d
--- /dev/null
@@ -0,0 +1,4 @@
+      Adding your-face (local) to optional dependencies.
+             Features:
+             + mouth
+             + nose
diff --git a/tests/snapshots/add/overwrite_path_noop.stdout b/tests/snapshots/add/overwrite_path_noop.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_path_with_version.in/dependency/Cargo.toml b/tests/snapshots/add/overwrite_path_with_version.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/overwrite_path_with_version.in/dependency/src/lib.rs b/tests/snapshots/add/overwrite_path_with_version.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_path_with_version.in/primary/Cargo.toml b/tests/snapshots/add/overwrite_path_with_version.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..9d20b22
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { optional = true, path = "../dependency" }
diff --git a/tests/snapshots/add/overwrite_path_with_version.in/primary/src/lib.rs b/tests/snapshots/add/overwrite_path_with_version.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_path_with_version.out/dependency/Cargo.toml b/tests/snapshots/add/overwrite_path_with_version.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/overwrite_path_with_version.out/primary/Cargo.toml b/tests/snapshots/add/overwrite_path_with_version.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..a20f209
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { optional = true, version = "20.0" }
diff --git a/tests/snapshots/add/overwrite_path_with_version.stderr b/tests/snapshots/add/overwrite_path_with_version.stderr
new file mode 100644 (file)
index 0000000..d0b3a4c
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding cargo-list-test-fixture-dependency v20.0 to optional dependencies.
diff --git a/tests/snapshots/add/overwrite_path_with_version.stdout b/tests/snapshots/add/overwrite_path_with_version.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_rename_with_no_rename.in/Cargo.toml b/tests/snapshots/add/overwrite_rename_with_no_rename.in/Cargo.toml
new file mode 100644 (file)
index 0000000..4502292
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+a1 = { package = "versioned-package", version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_rename_with_no_rename.in/src/lib.rs b/tests/snapshots/add/overwrite_rename_with_no_rename.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_rename_with_no_rename.out/Cargo.toml b/tests/snapshots/add/overwrite_rename_with_no_rename.out/Cargo.toml
new file mode 100644 (file)
index 0000000..9951492
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+a1 = { package = "versioned-package", version = "0.1.1", optional = true }
+versioned-package = "99999.0.0"
diff --git a/tests/snapshots/add/overwrite_rename_with_no_rename.stderr b/tests/snapshots/add/overwrite_rename_with_no_rename.stderr
new file mode 100644 (file)
index 0000000..305b89f
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding versioned-package v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/overwrite_rename_with_no_rename.stdout b/tests/snapshots/add/overwrite_rename_with_no_rename.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_rename_with_rename.in/Cargo.toml b/tests/snapshots/add/overwrite_rename_with_rename.in/Cargo.toml
new file mode 100644 (file)
index 0000000..4502292
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+a1 = { package = "versioned-package", version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_rename_with_rename.in/src/lib.rs b/tests/snapshots/add/overwrite_rename_with_rename.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_rename_with_rename.out/Cargo.toml b/tests/snapshots/add/overwrite_rename_with_rename.out/Cargo.toml
new file mode 100644 (file)
index 0000000..790f654
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+a1 = { package = "versioned-package", version = "0.1.1", optional = true }
+a2 = { version = "99999.0.0", package = "versioned-package" }
diff --git a/tests/snapshots/add/overwrite_rename_with_rename.stderr b/tests/snapshots/add/overwrite_rename_with_rename.stderr
new file mode 100644 (file)
index 0000000..305b89f
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding versioned-package v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/overwrite_rename_with_rename.stdout b/tests/snapshots/add/overwrite_rename_with_rename.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_rename_with_rename_noop.in/Cargo.toml b/tests/snapshots/add/overwrite_rename_with_rename_noop.in/Cargo.toml
new file mode 100644 (file)
index 0000000..4502292
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+a1 = { package = "versioned-package", version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_rename_with_rename_noop.in/src/lib.rs b/tests/snapshots/add/overwrite_rename_with_rename_noop.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_rename_with_rename_noop.out/Cargo.toml b/tests/snapshots/add/overwrite_rename_with_rename_noop.out/Cargo.toml
new file mode 100644 (file)
index 0000000..4502292
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+a1 = { package = "versioned-package", version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_rename_with_rename_noop.stderr b/tests/snapshots/add/overwrite_rename_with_rename_noop.stderr
new file mode 100644 (file)
index 0000000..d69dc92
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding versioned-package v0.1.1 to optional dependencies.
diff --git a/tests/snapshots/add/overwrite_rename_with_rename_noop.stdout b/tests/snapshots/add/overwrite_rename_with_rename_noop.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_version_with_git.in/Cargo.toml b/tests/snapshots/add/overwrite_version_with_git.in/Cargo.toml
new file mode 100644 (file)
index 0000000..fe41f2a
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+versioned-package = { version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_version_with_git.in/src/lib.rs b/tests/snapshots/add/overwrite_version_with_git.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_version_with_git.out/Cargo.toml b/tests/snapshots/add/overwrite_version_with_git.out/Cargo.toml
new file mode 100644 (file)
index 0000000..2600140
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+versioned-package = { version = "0.3.0", optional = true, git = "[ROOTURL]/versioned-package" }
diff --git a/tests/snapshots/add/overwrite_version_with_git.stderr b/tests/snapshots/add/overwrite_version_with_git.stderr
new file mode 100644 (file)
index 0000000..c501396
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating git repository `[ROOTURL]/versioned-package`
+      Adding versioned-package (git) to optional dependencies.
diff --git a/tests/snapshots/add/overwrite_version_with_git.stdout b/tests/snapshots/add/overwrite_version_with_git.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_version_with_path.in/dependency/Cargo.toml b/tests/snapshots/add/overwrite_version_with_path.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/overwrite_version_with_path.in/dependency/src/lib.rs b/tests/snapshots/add/overwrite_version_with_path.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_version_with_path.in/primary/Cargo.toml b/tests/snapshots/add/overwrite_version_with_path.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..063b891
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_version_with_path.in/primary/src/lib.rs b/tests/snapshots/add/overwrite_version_with_path.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_version_with_path.out/dependency/Cargo.toml b/tests/snapshots/add/overwrite_version_with_path.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/overwrite_version_with_path.out/primary/Cargo.toml b/tests/snapshots/add/overwrite_version_with_path.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..0725367
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", optional = true, path = "../dependency" }
diff --git a/tests/snapshots/add/overwrite_version_with_path.stderr b/tests/snapshots/add/overwrite_version_with_path.stderr
new file mode 100644 (file)
index 0000000..98abcfc
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to optional dependencies.
diff --git a/tests/snapshots/add/overwrite_version_with_path.stdout b/tests/snapshots/add/overwrite_version_with_path.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_with_rename.in/Cargo.toml b/tests/snapshots/add/overwrite_with_rename.in/Cargo.toml
new file mode 100644 (file)
index 0000000..fe41f2a
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+versioned-package = { version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_with_rename.in/src/lib.rs b/tests/snapshots/add/overwrite_with_rename.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/overwrite_with_rename.out/Cargo.toml b/tests/snapshots/add/overwrite_with_rename.out/Cargo.toml
new file mode 100644 (file)
index 0000000..4b74851
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+renamed = { version = "99999.0.0", package = "versioned-package" }
+versioned-package = { version = "0.1.1", optional = true }
diff --git a/tests/snapshots/add/overwrite_with_rename.stderr b/tests/snapshots/add/overwrite_with_rename.stderr
new file mode 100644 (file)
index 0000000..305b89f
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding versioned-package v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/overwrite_with_rename.stdout b/tests/snapshots/add/overwrite_with_rename.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path.in/dependency/Cargo.toml b/tests/snapshots/add/path.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path.in/dependency/src/lib.rs b/tests/snapshots/add/path.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path.in/primary/Cargo.toml b/tests/snapshots/add/path.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path.in/primary/src/lib.rs b/tests/snapshots/add/path.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path.out/dependency/Cargo.toml b/tests/snapshots/add/path.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path.out/primary/Cargo.toml b/tests/snapshots/add/path.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..93476d7
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "../dependency" }
diff --git a/tests/snapshots/add/path.stderr b/tests/snapshots/add/path.stderr
new file mode 100644 (file)
index 0000000..8109d3c
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dependencies.
diff --git a/tests/snapshots/add/path.stdout b/tests/snapshots/add/path.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_dev.in/dependency/Cargo.toml b/tests/snapshots/add/path_dev.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_dev.in/dependency/src/lib.rs b/tests/snapshots/add/path_dev.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_dev.in/primary/Cargo.toml b/tests/snapshots/add/path_dev.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_dev.in/primary/src/lib.rs b/tests/snapshots/add/path_dev.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_dev.out/dependency/Cargo.toml b/tests/snapshots/add/path_dev.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_dev.out/primary/Cargo.toml b/tests/snapshots/add/path_dev.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..92be59d
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev-dependencies]
+cargo-list-test-fixture-dependency = { path = "../dependency" }
diff --git a/tests/snapshots/add/path_dev.stderr b/tests/snapshots/add/path_dev.stderr
new file mode 100644 (file)
index 0000000..d8093d6
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dev-dependencies.
diff --git a/tests/snapshots/add/path_dev.stdout b/tests/snapshots/add/path_dev.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_inferred_name.in/dependency/Cargo.toml b/tests/snapshots/add/path_inferred_name.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_inferred_name.in/dependency/src/lib.rs b/tests/snapshots/add/path_inferred_name.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_inferred_name.in/primary/Cargo.toml b/tests/snapshots/add/path_inferred_name.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_inferred_name.in/primary/src/lib.rs b/tests/snapshots/add/path_inferred_name.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_inferred_name.out/dependency/Cargo.toml b/tests/snapshots/add/path_inferred_name.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_inferred_name.out/primary/Cargo.toml b/tests/snapshots/add/path_inferred_name.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..93476d7
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "../dependency" }
diff --git a/tests/snapshots/add/path_inferred_name.stderr b/tests/snapshots/add/path_inferred_name.stderr
new file mode 100644 (file)
index 0000000..8109d3c
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dependencies.
diff --git a/tests/snapshots/add/path_inferred_name.stdout b/tests/snapshots/add/path_inferred_name.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/Cargo.toml b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/Cargo.toml
new file mode 100644 (file)
index 0000000..299859e
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency", "optional"]
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/dependency/Cargo.toml b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..34157f4
--- /dev/null
@@ -0,0 +1,14 @@
+[package]
+name = "your-face"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
+optional-dependency = { path = "../optional", optional = true }
+
+[features]
+default = ["mouth"]
+nose = []
+mouth = ["nose"]
+eyes = []
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/dependency/src/lib.rs b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/optional/Cargo.toml b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/optional/Cargo.toml
new file mode 100644 (file)
index 0000000..0216dba
--- /dev/null
@@ -0,0 +1,7 @@
+[package]
+name = "optional-dep"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/optional/src/lib.rs b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/optional/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/primary/Cargo.toml b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/primary/src/lib.rs b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/Cargo.toml b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/Cargo.toml
new file mode 100644 (file)
index 0000000..299859e
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency", "optional"]
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/dependency/Cargo.toml b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..34157f4
--- /dev/null
@@ -0,0 +1,14 @@
+[package]
+name = "your-face"
+version = "0.1.3"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
+optional-dependency = { path = "../optional", optional = true }
+
+[features]
+default = ["mouth"]
+nose = []
+mouth = ["nose"]
+eyes = []
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/primary/Cargo.toml b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.stderr b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.stderr
new file mode 100644 (file)
index 0000000..791ca60
--- /dev/null
@@ -0,0 +1 @@
+error: `your-face/nose` is unsupported when inferring the crate name, use `nose`
diff --git a/tests/snapshots/add/path_inferred_name_conflicts_full_feature.stdout b/tests/snapshots/add/path_inferred_name_conflicts_full_feature.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_normalized_name.in/dependency/Cargo.toml b/tests/snapshots/add/path_normalized_name.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_normalized_name.in/dependency/src/lib.rs b/tests/snapshots/add/path_normalized_name.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_normalized_name.in/primary/Cargo.toml b/tests/snapshots/add/path_normalized_name.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_normalized_name.in/primary/src/lib.rs b/tests/snapshots/add/path_normalized_name.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/path_normalized_name.out/dependency/Cargo.toml b/tests/snapshots/add/path_normalized_name.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..cbe2441
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_normalized_name.out/primary/Cargo.toml b/tests/snapshots/add/path_normalized_name.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/path_normalized_name.stderr b/tests/snapshots/add/path_normalized_name.stderr
new file mode 100644 (file)
index 0000000..59b35e3
--- /dev/null
@@ -0,0 +1 @@
+error: the crate `cargo_list_test_fixture_dependency@[ROOT]/case/dependency` could not be found at `[ROOT]/case/dependency`
diff --git a/tests/snapshots/add/path_normalized_name.stdout b/tests/snapshots/add/path_normalized_name.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/preserve_sorted.in/Cargo.toml b/tests/snapshots/add/preserve_sorted.in/Cargo.toml
new file mode 100644 (file)
index 0000000..2716d64
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+atty = "0.2.13"
+toml_edit = "0.1.5"
diff --git a/tests/snapshots/add/preserve_sorted.in/src/lib.rs b/tests/snapshots/add/preserve_sorted.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/preserve_sorted.out/Cargo.toml b/tests/snapshots/add/preserve_sorted.out/Cargo.toml
new file mode 100644 (file)
index 0000000..88222bd
--- /dev/null
@@ -0,0 +1,10 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+atty = "0.2.13"
+toml = "99999.0.0"
+toml_edit = "0.1.5"
diff --git a/tests/snapshots/add/preserve_sorted.stderr b/tests/snapshots/add/preserve_sorted.stderr
new file mode 100644 (file)
index 0000000..7c83976
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding toml v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/preserve_sorted.stdout b/tests/snapshots/add/preserve_sorted.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/preserve_unsorted.in/Cargo.toml b/tests/snapshots/add/preserve_unsorted.in/Cargo.toml
new file mode 100644 (file)
index 0000000..5957df9
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
diff --git a/tests/snapshots/add/preserve_unsorted.in/src/lib.rs b/tests/snapshots/add/preserve_unsorted.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/preserve_unsorted.out/Cargo.toml b/tests/snapshots/add/preserve_unsorted.out/Cargo.toml
new file mode 100644 (file)
index 0000000..e01b925
--- /dev/null
@@ -0,0 +1,10 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+toml_edit = "0.1.5"
+atty = "0.2.13"
+toml = "99999.0.0"
diff --git a/tests/snapshots/add/preserve_unsorted.stderr b/tests/snapshots/add/preserve_unsorted.stderr
new file mode 100644 (file)
index 0000000..7c83976
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding toml v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/preserve_unsorted.stdout b/tests/snapshots/add/preserve_unsorted.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/quiet.in b/tests/snapshots/add/quiet.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/quiet.out/Cargo.toml b/tests/snapshots/add/quiet.out/Cargo.toml
new file mode 100644 (file)
index 0000000..79d735a
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = "99999.0.0"
diff --git a/tests/snapshots/add/quiet.stderr b/tests/snapshots/add/quiet.stderr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/quiet.stdout b/tests/snapshots/add/quiet.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/registry.in/Cargo.toml b/tests/snapshots/add/registry.in/Cargo.toml
new file mode 100644 (file)
index 0000000..3ecdb66
--- /dev/null
@@ -0,0 +1,5 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/registry.in/src/lib.rs b/tests/snapshots/add/registry.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/registry.out/Cargo.toml b/tests/snapshots/add/registry.out/Cargo.toml
new file mode 100644 (file)
index 0000000..e856bee
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package1 = { version = "99999.0.0", registry = "alternative" }
+my-package2 = { version = "99999.0.0", registry = "alternative" }
diff --git a/tests/snapshots/add/registry.stderr b/tests/snapshots/add/registry.stderr
new file mode 100644 (file)
index 0000000..437e780
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `alternative` index
+      Adding my-package1 v99999.0.0 to dependencies.
+      Adding my-package2 v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/registry.stdout b/tests/snapshots/add/registry.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/rename.in b/tests/snapshots/add/rename.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/rename.out/Cargo.toml b/tests/snapshots/add/rename.out/Cargo.toml
new file mode 100644 (file)
index 0000000..ebcfbbd
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+renamed = { version = "99999.0.0", package = "my-package" }
diff --git a/tests/snapshots/add/rename.stderr b/tests/snapshots/add/rename.stderr
new file mode 100644 (file)
index 0000000..fd6b711
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding my-package v99999.0.0 to dependencies.
diff --git a/tests/snapshots/add/rename.stdout b/tests/snapshots/add/rename.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/require_weak.in/Cargo.toml b/tests/snapshots/add/require_weak.in/Cargo.toml
new file mode 100644 (file)
index 0000000..54faf17
--- /dev/null
@@ -0,0 +1,11 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[features]
+eyes = ["your-face?/eyes"]
+
+[dependencies]
+your-face = { version = "99999.0.0", optional = true }
diff --git a/tests/snapshots/add/require_weak.in/src/lib.rs b/tests/snapshots/add/require_weak.in/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/require_weak.out/Cargo.toml b/tests/snapshots/add/require_weak.out/Cargo.toml
new file mode 100644 (file)
index 0000000..a0e4b97
--- /dev/null
@@ -0,0 +1,11 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[features]
+eyes = ["your-face/eyes"]
+
+[dependencies]
+your-face = { version = "99999.0.0" }
diff --git a/tests/snapshots/add/require_weak.stderr b/tests/snapshots/add/require_weak.stderr
new file mode 100644 (file)
index 0000000..796b960
--- /dev/null
@@ -0,0 +1,7 @@
+    Updating `dummy-registry` index
+      Adding your-face v99999.0.0 to dependencies.
+             Features:
+             - ears
+             - eyes
+             - mouth
+             - nose
diff --git a/tests/snapshots/add/require_weak.stdout b/tests/snapshots/add/require_weak.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/target.in b/tests/snapshots/add/target.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/target.out/Cargo.toml b/tests/snapshots/add/target.out/Cargo.toml
new file mode 100644 (file)
index 0000000..9c96ede
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[target.i686-unknown-linux-gnu.dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "99999.0.0"
diff --git a/tests/snapshots/add/target.stderr b/tests/snapshots/add/target.stderr
new file mode 100644 (file)
index 0000000..3413bcc
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies for target `i686-unknown-linux-gnu`.
+      Adding my-package2 v99999.0.0 to dependencies for target `i686-unknown-linux-gnu`.
diff --git a/tests/snapshots/add/target.stdout b/tests/snapshots/add/target.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/target_cfg.in b/tests/snapshots/add/target_cfg.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/target_cfg.out/Cargo.toml b/tests/snapshots/add/target_cfg.out/Cargo.toml
new file mode 100644 (file)
index 0000000..212ec57
--- /dev/null
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[target."cfg(unix)".dependencies]
+my-package1 = "99999.0.0"
+my-package2 = "99999.0.0"
diff --git a/tests/snapshots/add/target_cfg.stderr b/tests/snapshots/add/target_cfg.stderr
new file mode 100644 (file)
index 0000000..e405c8d
--- /dev/null
@@ -0,0 +1,3 @@
+    Updating `dummy-registry` index
+      Adding my-package1 v99999.0.0 to dependencies for target `cfg(unix)`.
+      Adding my-package2 v99999.0.0 to dependencies for target `cfg(unix)`.
diff --git a/tests/snapshots/add/target_cfg.stdout b/tests/snapshots/add/target_cfg.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/vers.in b/tests/snapshots/add/vers.in
new file mode 120000 (symlink)
index 0000000..87eae14
--- /dev/null
@@ -0,0 +1 @@
+add-basic.in/
\ No newline at end of file
diff --git a/tests/snapshots/add/vers.out/Cargo.toml b/tests/snapshots/add/vers.out/Cargo.toml
new file mode 100644 (file)
index 0000000..c6ca3d6
--- /dev/null
@@ -0,0 +1,8 @@
+[workspace]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+my-package = ">=0.1.1"
diff --git a/tests/snapshots/add/vers.stderr b/tests/snapshots/add/vers.stderr
new file mode 100644 (file)
index 0000000..7ef92d2
--- /dev/null
@@ -0,0 +1,2 @@
+    Updating `dummy-registry` index
+      Adding my-package >=0.1.1 to dependencies.
diff --git a/tests/snapshots/add/vers.stdout b/tests/snapshots/add/vers.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_name.in/Cargo.toml b/tests/snapshots/add/workspace_name.in/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/workspace_name.in/dependency/Cargo.toml b/tests/snapshots/add/workspace_name.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_name.in/dependency/src/lib.rs b/tests/snapshots/add/workspace_name.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_name.in/primary/Cargo.toml b/tests/snapshots/add/workspace_name.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_name.in/primary/src/lib.rs b/tests/snapshots/add/workspace_name.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_name.out/Cargo.toml b/tests/snapshots/add/workspace_name.out/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/workspace_name.out/dependency/Cargo.toml b/tests/snapshots/add/workspace_name.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_name.out/primary/Cargo.toml b/tests/snapshots/add/workspace_name.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..a693df5
--- /dev/null
@@ -0,0 +1,6 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "../dependency" }
diff --git a/tests/snapshots/add/workspace_name.stderr b/tests/snapshots/add/workspace_name.stderr
new file mode 100644 (file)
index 0000000..8109d3c
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dependencies.
diff --git a/tests/snapshots/add/workspace_name.stdout b/tests/snapshots/add/workspace_name.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_path.in/Cargo.toml b/tests/snapshots/add/workspace_path.in/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/workspace_path.in/dependency/Cargo.toml b/tests/snapshots/add/workspace_path.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_path.in/dependency/src/lib.rs b/tests/snapshots/add/workspace_path.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_path.in/primary/Cargo.toml b/tests/snapshots/add/workspace_path.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_path.in/primary/src/lib.rs b/tests/snapshots/add/workspace_path.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_path.out/Cargo.toml b/tests/snapshots/add/workspace_path.out/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/workspace_path.out/dependency/Cargo.toml b/tests/snapshots/add/workspace_path.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_path.out/primary/Cargo.toml b/tests/snapshots/add/workspace_path.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..a693df5
--- /dev/null
@@ -0,0 +1,6 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+cargo-list-test-fixture-dependency = { version = "0.0.0", path = "../dependency" }
diff --git a/tests/snapshots/add/workspace_path.stderr b/tests/snapshots/add/workspace_path.stderr
new file mode 100644 (file)
index 0000000..8109d3c
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dependencies.
diff --git a/tests/snapshots/add/workspace_path.stdout b/tests/snapshots/add/workspace_path.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_path_dev.in/Cargo.toml b/tests/snapshots/add/workspace_path_dev.in/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/workspace_path_dev.in/dependency/Cargo.toml b/tests/snapshots/add/workspace_path_dev.in/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_path_dev.in/dependency/src/lib.rs b/tests/snapshots/add/workspace_path_dev.in/dependency/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_path_dev.in/primary/Cargo.toml b/tests/snapshots/add/workspace_path_dev.in/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..5e20016
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_path_dev.in/primary/src/lib.rs b/tests/snapshots/add/workspace_path_dev.in/primary/src/lib.rs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/add/workspace_path_dev.out/Cargo.toml b/tests/snapshots/add/workspace_path_dev.out/Cargo.toml
new file mode 100644 (file)
index 0000000..57e1f30
--- /dev/null
@@ -0,0 +1,2 @@
+[workspace]
+members = ["primary", "dependency"]
diff --git a/tests/snapshots/add/workspace_path_dev.out/dependency/Cargo.toml b/tests/snapshots/add/workspace_path_dev.out/dependency/Cargo.toml
new file mode 100644 (file)
index 0000000..ca4f36d
--- /dev/null
@@ -0,0 +1,3 @@
+[package]
+name = "cargo-list-test-fixture-dependency"
+version = "0.0.0"
diff --git a/tests/snapshots/add/workspace_path_dev.out/primary/Cargo.toml b/tests/snapshots/add/workspace_path_dev.out/primary/Cargo.toml
new file mode 100644 (file)
index 0000000..8dfa5c2
--- /dev/null
@@ -0,0 +1,6 @@
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dev-dependencies]
+cargo-list-test-fixture-dependency = { path = "../dependency" }
diff --git a/tests/snapshots/add/workspace_path_dev.stderr b/tests/snapshots/add/workspace_path_dev.stderr
new file mode 100644 (file)
index 0000000..d8093d6
--- /dev/null
@@ -0,0 +1 @@
+      Adding cargo-list-test-fixture-dependency (local) to dev-dependencies.
diff --git a/tests/snapshots/add/workspace_path_dev.stdout b/tests/snapshots/add/workspace_path_dev.stdout
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/snapshots/copy.sh b/tests/snapshots/copy.sh
new file mode 100755 (executable)
index 0000000..c09d9a3
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+BEFORE=$1
+AFTER=$2
+if [ -z "${BEFORE}" ] || [ -z "${AFTER}" ]; then
+    echo "Copy a snapshot"
+    echo
+    echo "Run this from the snapshots directory, using the base name for the snapshots"
+    echo
+    echo "Usage: $0 <BEFORE> <AFTER>"
+    exit 1
+fi
+
+IN_LINK=$(readlink $1.in)
+if [ -n "${IN_LINK}" ]; then
+    echo "Linking to '${IN_LINK}'"
+    ln -s ${IN_LINK} $2.in
+elif [ -e "$1.in" ]; then
+    echo "Copying '$1.in'"
+    cp -r $1.in $2.in
+else
+    echo "No '$1.in'"
+fi
+if [ -e "$1.out" ]; then
+    echo "Copying '$1.out'"
+    cp -r $1.out $2.out
+else
+    echo "No '$1.out'"
+fi
+if [ -e "$1.stdout" ]; then
+    echo "Copying '$1.stdout'"
+    cp -r $1.stdout $2.stdout
+else
+    echo "No '$1.stdout'"
+fi
+if [ -e "$1.stderr" ]; then
+    echo "Copying '$1.stderr'"
+    cp -r $1.stderr $2.stderr
+else
+    echo "No '$1.stderr'"
+fi
+git add $2.*
diff --git a/tests/snapshots/rename.sh b/tests/snapshots/rename.sh
new file mode 100755 (executable)
index 0000000..4c854f5
--- /dev/null
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+BEFORE=$1
+AFTER=$2
+if [ -z "${BEFORE}" ] || [ -z "${AFTER}" ]; then
+    echo "Rename a snapshot"
+    echo
+    echo "Run this from the snapshots directory, using the base name for the snapshots"
+    echo
+    echo "Usage: $0 <BEFORE> <AFTER>"
+    exit 1
+fi
+
+if [ -e "$1.stdout" ]; then
+    echo "Renaming '$1.in"
+    mv $1.in $2.in
+else
+    echo "No '$1.in'"
+fi
+if [ -e "$1.stdout" ]; then
+    echo "Renaming '$1.out"
+    mv $1.out $2.out
+else
+    echo "No '$1.out'"
+fi
+if [ -e "$1.stdout" ]; then
+    echo "Renaming '$1.stdout"
+    mv $1.stdout $2.stdout
+else
+    echo "No '$1.stdout'"
+fi
+if [ -e "$1.stderr" ]; then
+    echo "Renaming '$1.stderr'"
+    mv $1.stderr $2.stderr
+else
+    echo "No '$1.stderr'"
+fi
+git add $2.*
diff --git a/tests/testsuite/cargo_add.rs b/tests/testsuite/cargo_add.rs
new file mode 100644 (file)
index 0000000..20a48dd
--- /dev/null
@@ -0,0 +1,2110 @@
+pub fn cargo_exe() -> &'static std::path::Path {
+    snapbox::cmd::cargo_bin!("cargo")
+}
+
+pub fn cargo_command() -> snapbox::cmd::Command {
+    let mut cmd = snapbox::cmd::Command::new(cargo_exe()).with_assert(assert());
+
+    // In general just clear out all cargo-specific configuration already in the
+    // environment. Our tests all assume a "default configuration" unless
+    // specified otherwise.
+    for (k, _v) in std::env::vars() {
+        if k.starts_with("CARGO_") {
+            cmd = cmd.env_remove(&k);
+        }
+    }
+
+    cmd = cmd
+        .env("HOME", cargo_test_support::paths::home())
+        .env(
+            "CARGO_HOME",
+            cargo_test_support::paths::home().join(".cargo"),
+        )
+        .env("__CARGO_TEST_ROOT", cargo_test_support::paths::root())
+        // Force Cargo to think it's on the stable channel for all tests, this
+        // should hopefully not surprise us as we add cargo features over time and
+        // cargo rides the trains.
+        .env("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS", "stable")
+        // For now disable incremental by default as support hasn't ridden to the
+        // stable channel yet. Once incremental support hits the stable compiler we
+        // can switch this to one and then fix the tests.
+        .env("CARGO_INCREMENTAL", "0")
+        .env_remove("__CARGO_DEFAULT_LIB_METADATA")
+        .env_remove("RUSTC")
+        .env_remove("RUSTDOC")
+        .env_remove("RUSTC_WRAPPER")
+        .env_remove("RUSTFLAGS")
+        .env_remove("RUSTDOCFLAGS")
+        .env_remove("XDG_CONFIG_HOME") // see #2345
+        .env("GIT_CONFIG_NOSYSTEM", "1") // keep trying to sandbox ourselves
+        .env_remove("EMAIL")
+        .env_remove("USER") // not set on some rust-lang docker images
+        .env_remove("MFLAGS")
+        .env_remove("MAKEFLAGS")
+        .env_remove("GIT_AUTHOR_NAME")
+        .env_remove("GIT_AUTHOR_EMAIL")
+        .env_remove("GIT_COMMITTER_NAME")
+        .env_remove("GIT_COMMITTER_EMAIL")
+        .env_remove("MSYSTEM"); // assume cmd.exe everywhere on windows
+
+    cmd
+}
+
+pub fn project_from_template(template_path: impl AsRef<std::path::Path>) -> std::path::PathBuf {
+    let root = cargo_test_support::paths::root();
+    let project_root = root.join("case");
+    snapbox::path::copy_template(template_path.as_ref(), &project_root).unwrap();
+    project_root
+}
+
+pub fn assert() -> snapbox::Assert {
+    let root = cargo_test_support::paths::root();
+    // Use `from_file_path` instead of `from_dir_path` so the trailing slash is
+    // put in the users output, rather than hidden in the variable
+    let root_url = url::Url::from_file_path(&root).unwrap().to_string();
+    let root = root.display().to_string();
+
+    let mut subs = snapbox::Substitutions::new();
+    subs.extend([
+        (
+            "[EXE]",
+            std::borrow::Cow::Borrowed(std::env::consts::EXE_SUFFIX),
+        ),
+        ("[ROOT]", std::borrow::Cow::Owned(root)),
+        ("[ROOTURL]", std::borrow::Cow::Owned(root_url)),
+    ])
+    .unwrap();
+    snapbox::Assert::new()
+        .action_env(snapbox::DEFAULT_ACTION_ENV)
+        .substitutions(subs)
+}
+
+fn init_registry() {
+    cargo_test_support::registry::init();
+    add_registry_packages(false);
+}
+
+fn init_alt_registry() {
+    cargo_test_support::registry::alt_init();
+    add_registry_packages(true);
+}
+
+fn add_registry_packages(alt: bool) {
+    for name in [
+        "my-package",
+        "my-package1",
+        "my-package2",
+        "my-dev-package1",
+        "my-dev-package2",
+        "my-build-package1",
+        "my-build-package2",
+        "toml",
+        "versioned-package",
+        "cargo-list-test-fixture-dependency",
+        "unrelateed-crate",
+    ] {
+        cargo_test_support::registry::Package::new(name, "0.1.1+my-package")
+            .alternative(alt)
+            .publish();
+        cargo_test_support::registry::Package::new(name, "0.2.3+my-package")
+            .alternative(alt)
+            .publish();
+        cargo_test_support::registry::Package::new(name, "0.4.1+my-package")
+            .alternative(alt)
+            .publish();
+        cargo_test_support::registry::Package::new(name, "20.0.0+my-package")
+            .alternative(alt)
+            .publish();
+        cargo_test_support::registry::Package::new(name, "99999.0.0+my-package")
+            .alternative(alt)
+            .publish();
+        cargo_test_support::registry::Package::new(name, "99999.0.0-alpha.1+my-package")
+            .alternative(alt)
+            .publish();
+    }
+
+    cargo_test_support::registry::Package::new("prerelease_only", "0.2.0-alpha.1")
+        .alternative(alt)
+        .publish();
+    cargo_test_support::registry::Package::new("test_breaking", "0.2.0")
+        .alternative(alt)
+        .publish();
+    cargo_test_support::registry::Package::new("test_nonbreaking", "0.1.1")
+        .alternative(alt)
+        .publish();
+
+    // Normalization
+    cargo_test_support::registry::Package::new("linked-hash-map", "0.5.4")
+        .alternative(alt)
+        .feature("clippy", &[])
+        .feature("heapsize", &[])
+        .feature("heapsize_impl", &[])
+        .feature("nightly", &[])
+        .feature("serde", &[])
+        .feature("serde_impl", &[])
+        .feature("serde_test", &[])
+        .publish();
+    cargo_test_support::registry::Package::new("inflector", "0.11.4")
+        .alternative(alt)
+        .feature("default", &["heavyweight", "lazy_static", "regex"])
+        .feature("heavyweight", &[])
+        .feature("lazy_static", &[])
+        .feature("regex", &[])
+        .feature("unstable", &[])
+        .publish();
+
+    cargo_test_support::registry::Package::new("your-face", "99999.0.0+my-package")
+        .alternative(alt)
+        .feature("nose", &[])
+        .feature("mouth", &[])
+        .feature("eyes", &[])
+        .feature("ears", &[])
+        .publish();
+}
+
+#[cargo_test]
+fn add_basic() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/add_basic.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/add_basic.stdout")
+        .stderr_matches_path("tests/snapshots/add/add_basic.stderr");
+
+    assert().subset_matches("tests/snapshots/add/add_basic.out", &project_root);
+}
+
+#[cargo_test]
+fn add_multiple() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/add_multiple.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/add_multiple.stdout")
+        .stderr_matches_path("tests/snapshots/add/add_multiple.stderr");
+
+    assert().subset_matches("tests/snapshots/add/add_multiple.out", &project_root);
+}
+
+#[cargo_test]
+fn quiet() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/quiet.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["--quiet", "your-face"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/quiet.stdout")
+        .stderr_matches_path("tests/snapshots/add/quiet.stderr");
+
+    assert().subset_matches("tests/snapshots/add/quiet.out", &project_root);
+}
+
+#[cargo_test]
+fn add_normalized_name_external() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/add_normalized_name_external.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["linked_hash_map", "Inflector"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/add_normalized_name_external.stdout")
+        .stderr_matches_path("tests/snapshots/add/add_normalized_name_external.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/add_normalized_name_external.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn infer_prerelease() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/infer_prerelease.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["prerelease_only"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/infer_prerelease.stdout")
+        .stderr_matches_path("tests/snapshots/add/infer_prerelease.stderr");
+
+    assert().subset_matches("tests/snapshots/add/infer_prerelease.out", &project_root);
+}
+
+#[cargo_test]
+fn build() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/build.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["--build", "my-build-package1", "my-build-package2"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/build.stdout")
+        .stderr_matches_path("tests/snapshots/add/build.stderr");
+
+    assert().subset_matches("tests/snapshots/add/build.out", &project_root);
+}
+
+#[cargo_test]
+fn build_prefer_existing_version() {
+    init_alt_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/build_prefer_existing_version.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["cargo-list-test-fixture-dependency", "--build"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/build_prefer_existing_version.stdout")
+        .stderr_matches_path("tests/snapshots/add/build_prefer_existing_version.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/build_prefer_existing_version.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn default_features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/default_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--default-features"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/default_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/default_features.stderr");
+
+    assert().subset_matches("tests/snapshots/add/default_features.out", &project_root);
+}
+
+#[cargo_test]
+fn require_weak() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/require_weak.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--no-optional"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/require_weak.stdout")
+        .stderr_matches_path("tests/snapshots/add/require_weak.stderr");
+
+    assert().subset_matches("tests/snapshots/add/require_weak.out", &project_root);
+}
+
+#[cargo_test]
+fn dev() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/dev.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["--dev", "my-dev-package1", "my-dev-package2"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/dev.stdout")
+        .stderr_matches_path("tests/snapshots/add/dev.stderr");
+
+    assert().subset_matches("tests/snapshots/add/dev.out", &project_root);
+}
+
+#[cargo_test]
+fn dev_build_conflict() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/dev_build_conflict.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package", "--dev", "--build"])
+        .current_dir(cwd)
+        .assert()
+        .code(1)
+        .stdout_matches_path("tests/snapshots/add/dev_build_conflict.stdout")
+        .stderr_matches_path("tests/snapshots/add/dev_build_conflict.stderr");
+
+    assert().subset_matches("tests/snapshots/add/dev_build_conflict.out", &project_root);
+}
+
+#[cargo_test]
+fn dev_prefer_existing_version() {
+    init_alt_registry();
+    let project_root = project_from_template("tests/snapshots/add/dev_prefer_existing_version.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["cargo-list-test-fixture-dependency", "--dev"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/dev_prefer_existing_version.stdout")
+        .stderr_matches_path("tests/snapshots/add/dev_prefer_existing_version.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/dev_prefer_existing_version.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn dry_run() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/dry_run.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package", "--dry-run"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/dry_run.stdout")
+        .stderr_matches_path("tests/snapshots/add/dry_run.stderr");
+
+    assert().subset_matches("tests/snapshots/add/dry_run.out", &project_root);
+}
+
+#[cargo_test]
+fn features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--features", "eyes"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/features.stdout")
+        .stderr_matches_path("tests/snapshots/add/features.stderr");
+
+    assert().subset_matches("tests/snapshots/add/features.out", &project_root);
+}
+
+#[cargo_test]
+fn features_empty() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/features_empty.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--features", ""])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/features_empty.stdout")
+        .stderr_matches_path("tests/snapshots/add/features_empty.stderr");
+
+    assert().subset_matches("tests/snapshots/add/features_empty.out", &project_root);
+}
+
+#[cargo_test]
+fn features_multiple_occurrences() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/features_multiple_occurrences.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--features", "eyes", "--features", "nose"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/features_multiple_occurrences.stdout")
+        .stderr_matches_path("tests/snapshots/add/features_multiple_occurrences.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/features_multiple_occurrences.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn features_preserve() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/features_preserve.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/features_preserve.stdout")
+        .stderr_matches_path("tests/snapshots/add/features_preserve.stderr");
+
+    assert().subset_matches("tests/snapshots/add/features_preserve.out", &project_root);
+}
+
+#[cargo_test]
+fn features_spaced_values() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/features_spaced_values.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--features", "eyes nose"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/features_spaced_values.stdout")
+        .stderr_matches_path("tests/snapshots/add/features_spaced_values.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/features_spaced_values.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn features_unknown() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/features_unknown.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--features", "noze"])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/features_unknown.stdout")
+        .stderr_matches_path("tests/snapshots/add/features_unknown.stderr");
+
+    assert().subset_matches("tests/snapshots/add/features_unknown.out", &project_root);
+}
+
+#[cargo_test]
+fn git() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["git-package", "--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git.stdout")
+        .stderr_matches_path("tests/snapshots/add/git.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git.out", &project_root);
+}
+
+#[cargo_test]
+fn git_inferred_name() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_inferred_name.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git_inferred_name.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_inferred_name.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_inferred_name.out", &project_root);
+}
+
+#[cargo_test]
+fn git_inferred_name_multiple() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_inferred_name_multiple.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("git-package", |project| {
+        project
+            .file(
+                "p1/Cargo.toml",
+                &cargo_test_support::basic_manifest("my-package1", "0.3.0+my-package1"),
+            )
+            .file("p1/src/lib.rs", "")
+            .file(
+                "p2/Cargo.toml",
+                &cargo_test_support::basic_manifest("my-package2", "0.3.0+my-package2"),
+            )
+            .file("p2/src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/git_inferred_name_multiple.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_inferred_name_multiple.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/git_inferred_name_multiple.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn git_normalized_name() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_normalized_name.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["git_package", "--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .failure() // Fuzzy searching for paths isn't supported at this time
+        .stdout_matches_path("tests/snapshots/add/git_normalized_name.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_normalized_name.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_normalized_name.out", &project_root);
+}
+
+#[cargo_test]
+fn invalid_git_name() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_git_name.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["not-in-git", "--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_git_name.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_git_name.stderr");
+
+    assert().subset_matches("tests/snapshots/add/invalid_git_name.out", &project_root);
+}
+
+#[cargo_test]
+fn git_branch() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_branch.in");
+    let cwd = &project_root;
+    let (git_dep, git_repo) = cargo_test_support::git::new_repo("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let branch = "dev";
+    let find_head = || (git_repo.head().unwrap().peel_to_commit().unwrap());
+    git_repo.branch(branch, &find_head(), false).unwrap();
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["git-package", "--git", &git_url, "--branch", branch])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git_branch.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_branch.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_branch.out", &project_root);
+}
+
+#[cargo_test]
+fn git_conflicts_namever() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_conflicts_namever.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "my-package@0.4.3",
+            "--git",
+            "https://github.com/dcjanus/invalid",
+        ])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/git_conflicts_namever.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_conflicts_namever.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/git_conflicts_namever.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn git_registry() {
+    init_alt_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_registry.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("versioned-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("versioned-package", "0.3.0+versioned-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "versioned-package",
+            "--git",
+            &git_url,
+            "--registry",
+            "alternative",
+        ])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git_registry.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_registry.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_registry.out", &project_root);
+}
+
+#[cargo_test]
+fn git_dev() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_dev.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["git-package", "--git", &git_url, "--dev"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git_dev.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_dev.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_dev.out", &project_root);
+}
+
+#[cargo_test]
+fn git_rev() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_rev.in");
+    let cwd = &project_root;
+    let (git_dep, git_repo) = cargo_test_support::git::new_repo("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let find_head = || (git_repo.head().unwrap().peel_to_commit().unwrap());
+    let head = find_head().id().to_string();
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["git-package", "--git", &git_url, "--rev", &head])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git_rev.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_rev.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_rev.out", &project_root);
+}
+
+#[cargo_test]
+fn git_tag() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_tag.in");
+    let cwd = &project_root;
+    let (git_dep, git_repo) = cargo_test_support::git::new_repo("git-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("git-package", "0.3.0+git-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let tag = "v1.0.0";
+    cargo_test_support::git::tag(&git_repo, tag);
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["git-package", "--git", &git_url, "--tag", tag])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git_tag.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_tag.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_tag.out", &project_root);
+}
+
+#[cargo_test]
+fn path() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/path.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture-dependency",
+            "--path",
+            "../dependency",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/path.stdout")
+        .stderr_matches_path("tests/snapshots/add/path.stderr");
+
+    assert().subset_matches("tests/snapshots/add/path.out", &project_root);
+}
+
+#[cargo_test]
+fn path_inferred_name() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/path_inferred_name.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture-dependency",
+            "--path",
+            "../dependency",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/path_inferred_name.stdout")
+        .stderr_matches_path("tests/snapshots/add/path_inferred_name.stderr");
+
+    assert().subset_matches("tests/snapshots/add/path_inferred_name.out", &project_root);
+}
+
+#[cargo_test]
+fn path_inferred_name_conflicts_full_feature() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/path_inferred_name_conflicts_full_feature.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args(["--path", "../dependency", "--features", "your-face/nose"])
+        .current_dir(&cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/path_inferred_name_conflicts_full_feature.stdout")
+        .stderr_matches_path(
+            "tests/snapshots/add/path_inferred_name_conflicts_full_feature.stderr",
+        );
+
+    assert().subset_matches(
+        "tests/snapshots/add/path_inferred_name_conflicts_full_feature.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn path_normalized_name() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/path_normalized_name.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo_list_test_fixture_dependency",
+            "--path",
+            "../dependency",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .failure() // Fuzzy searching for paths isn't supported at this time
+        .stdout_matches_path("tests/snapshots/add/path_normalized_name.stdout")
+        .stderr_matches_path("tests/snapshots/add/path_normalized_name.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/path_normalized_name.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn invalid_path_name() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_path_name.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args(["not-at-path", "--path", "../dependency"])
+        .current_dir(&cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_path_name.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_path_name.stderr");
+
+    assert().subset_matches("tests/snapshots/add/invalid_path_name.out", &project_root);
+}
+
+#[cargo_test]
+fn path_dev() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/path_dev.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture-dependency",
+            "--path",
+            "../dependency",
+            "--dev",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/path_dev.stdout")
+        .stderr_matches_path("tests/snapshots/add/path_dev.stderr");
+
+    assert().subset_matches("tests/snapshots/add/path_dev.out", &project_root);
+}
+
+#[cargo_test]
+fn invalid_arg() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_arg.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package", "--flag"])
+        .current_dir(cwd)
+        .assert()
+        .code(1)
+        .stdout_matches_path("tests/snapshots/add/invalid_arg.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_arg.stderr");
+
+    assert().subset_matches("tests/snapshots/add/invalid_arg.out", &project_root);
+}
+
+#[cargo_test]
+fn invalid_git_external() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_git_external.in");
+    let cwd = &project_root;
+    let git_url = url::Url::from_directory_path(cwd.join("does-not-exist"))
+        .unwrap()
+        .to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["fake-git", "--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_git_external.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_git_external.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/invalid_git_external.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn invalid_path() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_path.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture",
+            "--path",
+            "./tests/fixtures/local",
+        ])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_path.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_path.stderr");
+
+    assert().subset_matches("tests/snapshots/add/invalid_path.out", &project_root);
+}
+
+#[cargo_test]
+fn invalid_path_self() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_path_self.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["cargo-list-test-fixture", "--path", "."])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_path_self.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_path_self.stderr");
+
+    assert().subset_matches("tests/snapshots/add/invalid_path_self.out", &project_root);
+}
+
+#[cargo_test]
+fn invalid_manifest() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_manifest.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package"])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_manifest.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_manifest.stderr");
+
+    assert().subset_matches("tests/snapshots/add/invalid_manifest.out", &project_root);
+}
+
+#[cargo_test]
+fn invalid_name_external() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_name_external.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["lets_hope_nobody_ever_publishes_this_crate"])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_name_external.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_name_external.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/invalid_name_external.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn invalid_target_empty() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_target_empty.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package", "--target", ""])
+        .current_dir(cwd)
+        .assert()
+        .code(1)
+        .stdout_matches_path("tests/snapshots/add/invalid_target_empty.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_target_empty.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/invalid_target_empty.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn invalid_vers() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/invalid_vers.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package@invalid version string"])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/invalid_vers.stdout")
+        .stderr_matches_path("tests/snapshots/add/invalid_vers.stderr");
+
+    assert().subset_matches("tests/snapshots/add/invalid_vers.out", &project_root);
+}
+
+#[cargo_test]
+fn list_features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/list_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/list_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/list_features.stderr");
+
+    assert().subset_matches("tests/snapshots/add/list_features.out", &project_root);
+}
+
+#[cargo_test]
+fn list_features_path() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/list_features_path.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--path", "../dependency"])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/list_features_path.stdout")
+        .stderr_matches_path("tests/snapshots/add/list_features_path.stderr");
+
+    assert().subset_matches("tests/snapshots/add/list_features_path.out", &project_root);
+}
+
+#[cargo_test]
+fn list_features_path_no_default() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/list_features_path_no_default.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "your-face",
+            "--path",
+            "../dependency",
+            "--no-default-features",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/list_features_path_no_default.stdout")
+        .stderr_matches_path("tests/snapshots/add/list_features_path_no_default.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/list_features_path_no_default.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn manifest_path_package() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/manifest_path_package.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "--manifest-path",
+            "Cargo.toml",
+            "--package",
+            "cargo-list-test-fixture",
+            "cargo-list-test-fixture-dependency",
+        ])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/manifest_path_package.stdout")
+        .stderr_matches_path("tests/snapshots/add/manifest_path_package.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/manifest_path_package.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn multiple_conflicts_with_features() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/multiple_conflicts_with_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "your-face", "--features", "nose"])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/multiple_conflicts_with_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/multiple_conflicts_with_features.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/multiple_conflicts_with_features.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn git_multiple_names() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/git_multiple_names.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("git-package", |project| {
+        project
+            .file(
+                "p1/Cargo.toml",
+                &cargo_test_support::basic_manifest("my-package1", "0.3.0+my-package1"),
+            )
+            .file("p1/src/lib.rs", "")
+            .file(
+                "p2/Cargo.toml",
+                &cargo_test_support::basic_manifest("my-package2", "0.3.0+my-package2"),
+            )
+            .file("p2/src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2", "--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/git_multiple_names.stdout")
+        .stderr_matches_path("tests/snapshots/add/git_multiple_names.stderr");
+
+    assert().subset_matches("tests/snapshots/add/git_multiple_names.out", &project_root);
+}
+
+#[cargo_test]
+fn multiple_conflicts_with_rename() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/multiple_conflicts_with_rename.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2", "--rename", "renamed"])
+        .current_dir(cwd)
+        .assert()
+        .code(101)
+        .stdout_matches_path("tests/snapshots/add/multiple_conflicts_with_rename.stdout")
+        .stderr_matches_path("tests/snapshots/add/multiple_conflicts_with_rename.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/multiple_conflicts_with_rename.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn namever() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/namever.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1@>=0.1.1", "my-package2@0.2.3", "my-package"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/namever.stdout")
+        .stderr_matches_path("tests/snapshots/add/namever.stderr");
+
+    assert().subset_matches("tests/snapshots/add/namever.out", &project_root);
+}
+
+#[cargo_test]
+fn no_args() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/no_args.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .current_dir(cwd)
+        .assert()
+        .code(1)
+        .stdout_matches_path("tests/snapshots/add/no_args.stdout")
+        .stderr_matches_path("tests/snapshots/add/no_args.stderr");
+
+    assert().subset_matches("tests/snapshots/add/no_args.out", &project_root);
+}
+
+#[cargo_test]
+fn no_default_features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/no_default_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--no-default-features"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/no_default_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/no_default_features.stderr");
+
+    assert().subset_matches("tests/snapshots/add/no_default_features.out", &project_root);
+}
+
+#[cargo_test]
+fn no_optional() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/no_optional.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--no-optional"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/no_optional.stdout")
+        .stderr_matches_path("tests/snapshots/add/no_optional.stderr");
+
+    assert().subset_matches("tests/snapshots/add/no_optional.out", &project_root);
+}
+
+#[cargo_test]
+fn optional() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/optional.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--optional"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/optional.stdout")
+        .stderr_matches_path("tests/snapshots/add/optional.stderr");
+
+    assert().subset_matches("tests/snapshots/add/optional.out", &project_root);
+}
+
+#[cargo_test]
+fn overwrite_default_features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_default_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--default-features"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_default_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_default_features.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_default_features.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_default_features_with_no_default_features() {
+    init_registry();
+    let project_root = project_from_template(
+        "tests/snapshots/add/overwrite_default_features_with_no_default_features.in",
+    );
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--no-default-features"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path(
+            "tests/snapshots/add/overwrite_default_features_with_no_default_features.stdout",
+        )
+        .stderr_matches_path(
+            "tests/snapshots/add/overwrite_default_features_with_no_default_features.stderr",
+        );
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_default_features_with_no_default_features.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--features", "nose"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_features.stderr");
+
+    assert().subset_matches("tests/snapshots/add/overwrite_features.out", &project_root);
+}
+
+#[cargo_test]
+fn overwrite_git_with_path() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_git_with_path.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture-dependency",
+            "--path",
+            "../dependency",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_git_with_path.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_git_with_path.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_git_with_path.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_inline_features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_inline_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "unrelateed-crate",
+            "your-face",
+            "--features",
+            "your-face/nose,your-face/mouth",
+            "-Fyour-face/ears",
+        ])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_inline_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_inline_features.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_inline_features.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_name_dev_noop() {
+    init_alt_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_name_dev_noop.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--dev"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_name_dev_noop.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_name_dev_noop.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_name_dev_noop.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_name_noop() {
+    init_alt_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_name_noop.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_name_noop.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_name_noop.stderr");
+
+    assert().subset_matches("tests/snapshots/add/overwrite_name_noop.out", &project_root);
+}
+
+#[cargo_test]
+fn overwrite_no_default_features() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/overwrite_no_default_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--no-default-features"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_no_default_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_no_default_features.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_no_default_features.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_no_default_features_with_default_features() {
+    init_registry();
+    let project_root = project_from_template(
+        "tests/snapshots/add/overwrite_no_default_features_with_default_features.in",
+    );
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--default-features"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path(
+            "tests/snapshots/add/overwrite_no_default_features_with_default_features.stdout",
+        )
+        .stderr_matches_path(
+            "tests/snapshots/add/overwrite_no_default_features_with_default_features.stderr",
+        );
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_no_default_features_with_default_features.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_no_optional() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_no_optional.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--no-optional"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_no_optional.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_no_optional.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_no_optional.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_no_optional_with_optional() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/overwrite_no_optional_with_optional.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--optional"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_no_optional_with_optional.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_no_optional_with_optional.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_no_optional_with_optional.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_optional() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_optional.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--optional"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_optional.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_optional.stderr");
+
+    assert().subset_matches("tests/snapshots/add/overwrite_optional.out", &project_root);
+}
+
+#[cargo_test]
+fn overwrite_optional_with_no_optional() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/overwrite_optional_with_no_optional.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2@0.4.1", "--no-optional"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_optional_with_no_optional.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_optional_with_no_optional.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_optional_with_no_optional.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_path_noop() {
+    init_alt_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_path_noop.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["your-face", "--path", "./dependency"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_path_noop.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_path_noop.stderr");
+
+    assert().subset_matches("tests/snapshots/add/overwrite_path_noop.out", &project_root);
+}
+
+#[cargo_test]
+fn overwrite_path_with_version() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_path_with_version.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args(["cargo-list-test-fixture-dependency@20.0"])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_path_with_version.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_path_with_version.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_path_with_version.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_rename_with_no_rename() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/overwrite_rename_with_no_rename.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["versioned-package"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_rename_with_no_rename.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_rename_with_no_rename.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_rename_with_no_rename.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_rename_with_rename() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_rename_with_rename.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["versioned-package", "--rename", "a2"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_rename_with_rename.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_rename_with_rename.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_rename_with_rename.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn change_rename_target() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/change_rename_target.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package2", "--rename", "some-package"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/change_rename_target.stdout")
+        .stderr_matches_path("tests/snapshots/add/change_rename_target.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/change_rename_target.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_rename_with_rename_noop() {
+    init_registry();
+    let project_root =
+        project_from_template("tests/snapshots/add/overwrite_rename_with_rename_noop.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["versioned-package", "--rename", "a1"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_rename_with_rename_noop.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_rename_with_rename_noop.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_rename_with_rename_noop.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_version_with_git() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_version_with_git.in");
+    let cwd = &project_root;
+    let git_dep = cargo_test_support::git::new("versioned-package", |project| {
+        project
+            .file(
+                "Cargo.toml",
+                &cargo_test_support::basic_manifest("versioned-package", "0.3.0+versioned-package"),
+            )
+            .file("src/lib.rs", "")
+    });
+    let git_url = git_dep.url().to_string();
+
+    cargo_command()
+        .arg("add")
+        .args(["versioned-package", "--git", &git_url])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_version_with_git.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_version_with_git.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_version_with_git.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_version_with_path() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_version_with_path.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture-dependency",
+            "--path",
+            "../dependency",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_version_with_path.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_version_with_path.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_version_with_path.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn overwrite_with_rename() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/overwrite_with_rename.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["versioned-package", "--rename", "renamed"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/overwrite_with_rename.stdout")
+        .stderr_matches_path("tests/snapshots/add/overwrite_with_rename.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/overwrite_with_rename.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn preserve_sorted() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/preserve_sorted.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["toml"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/preserve_sorted.stdout")
+        .stderr_matches_path("tests/snapshots/add/preserve_sorted.stderr");
+
+    assert().subset_matches("tests/snapshots/add/preserve_sorted.out", &project_root);
+}
+
+#[cargo_test]
+fn preserve_unsorted() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/preserve_unsorted.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["toml"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/preserve_unsorted.stdout")
+        .stderr_matches_path("tests/snapshots/add/preserve_unsorted.stderr");
+
+    assert().subset_matches("tests/snapshots/add/preserve_unsorted.out", &project_root);
+}
+
+#[cargo_test]
+fn registry() {
+    init_alt_registry();
+    let project_root = project_from_template("tests/snapshots/add/registry.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2", "--registry", "alternative"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/registry.stdout")
+        .stderr_matches_path("tests/snapshots/add/registry.stderr");
+
+    assert().subset_matches("tests/snapshots/add/registry.out", &project_root);
+}
+
+#[cargo_test]
+fn rename() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/rename.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package", "--rename", "renamed"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/rename.stdout")
+        .stderr_matches_path("tests/snapshots/add/rename.stderr");
+
+    assert().subset_matches("tests/snapshots/add/rename.out", &project_root);
+}
+
+#[cargo_test]
+fn target() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/target.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "my-package1",
+            "my-package2",
+            "--target",
+            "i686-unknown-linux-gnu",
+        ])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/target.stdout")
+        .stderr_matches_path("tests/snapshots/add/target.stderr");
+
+    assert().subset_matches("tests/snapshots/add/target.out", &project_root);
+}
+
+#[cargo_test]
+fn target_cfg() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/target_cfg.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package1", "my-package2", "--target", "cfg(unix)"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/target_cfg.stdout")
+        .stderr_matches_path("tests/snapshots/add/target_cfg.stderr");
+
+    assert().subset_matches("tests/snapshots/add/target_cfg.out", &project_root);
+}
+
+#[cargo_test]
+fn vers() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/vers.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package@>=0.1.1"])
+        .current_dir(cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/vers.stdout")
+        .stderr_matches_path("tests/snapshots/add/vers.stderr");
+
+    assert().subset_matches("tests/snapshots/add/vers.out", &project_root);
+}
+
+#[cargo_test]
+fn workspace_path() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/workspace_path.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture-dependency",
+            "--path",
+            "../dependency",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/workspace_path.stdout")
+        .stderr_matches_path("tests/snapshots/add/workspace_path.stderr");
+
+    assert().subset_matches("tests/snapshots/add/workspace_path.out", &project_root);
+}
+
+#[cargo_test]
+fn workspace_path_dev() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/workspace_path_dev.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args([
+            "cargo-list-test-fixture-dependency",
+            "--path",
+            "../dependency",
+            "--dev",
+        ])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/workspace_path_dev.stdout")
+        .stderr_matches_path("tests/snapshots/add/workspace_path_dev.stderr");
+
+    assert().subset_matches("tests/snapshots/add/workspace_path_dev.out", &project_root);
+}
+
+#[cargo_test]
+fn workspace_name() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/workspace_name.in");
+    let cwd = project_root.join("primary");
+
+    cargo_command()
+        .arg("add")
+        .args(["cargo-list-test-fixture-dependency"])
+        .current_dir(&cwd)
+        .assert()
+        .success()
+        .stdout_matches_path("tests/snapshots/add/workspace_name.stdout")
+        .stderr_matches_path("tests/snapshots/add/workspace_name.stderr");
+
+    assert().subset_matches("tests/snapshots/add/workspace_name.out", &project_root);
+}
+
+#[cargo_test]
+fn deprecated_default_features() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/deprecated_default_features.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package"])
+        .current_dir(&cwd)
+        .assert()
+        .failure()
+        .stdout_matches_path("tests/snapshots/add/deprecated_default_features.stdout")
+        .stderr_matches_path("tests/snapshots/add/deprecated_default_features.stderr");
+
+    assert().subset_matches(
+        "tests/snapshots/add/deprecated_default_features.out",
+        &project_root,
+    );
+}
+
+#[cargo_test]
+fn deprecated_section() {
+    init_registry();
+    let project_root = project_from_template("tests/snapshots/add/deprecated_section.in");
+    let cwd = &project_root;
+
+    cargo_command()
+        .arg("add")
+        .args(["my-package"])
+        .current_dir(&cwd)
+        .assert()
+        .failure()
+        .stdout_matches_path("tests/snapshots/add/deprecated_section.stdout")
+        .stderr_matches_path("tests/snapshots/add/deprecated_section.stderr");
+
+    assert().subset_matches("tests/snapshots/add/deprecated_section.out", &project_root);
+}
index a89324f9f9571b8b79396ecab826d5b79a28508b..134bbf5d9fb95184b0268415b483c48b166ebe4f 100644 (file)
@@ -19,6 +19,7 @@ mod build_script;
 mod build_script_env;
 mod build_script_extra_link_arg;
 mod cache_messages;
+mod cargo_add;
 mod cargo_alias_config;
 mod cargo_command;
 mod cargo_config;