cargo/tests/testsuite/cargo_add
bors 269783715b Auto merge of #13272 - linyihai:cargo-add-public-manpage, r=epage
doc: add `public` info in `cargo-add` man page.

### What does this PR try to resolve?
follow up https://github.com/rust-lang/cargo/pull/13046
add `public/private` explanation for `cargo-add` in man page.

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

### Additional information

The help info would be like this

- `cargo help add`
```
        --public
           Mark the dependency as public.

           The dependency can be referenced in your library’s public API.

           Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>

       --no-public
           Mark the dependency as private.

           While you can use the crate in your implementation, it cannot be referenced in your public API.

           Unstable (nightly-only) <https://doc.rust-lang.org/cargo/reference/unstable.html#public-dependency>
```
- `cargo add -h`
```
      --public               Mark the dependency as public (unstable)
      --no-public            Mark the dependency as private (unstable)
```

- `cargo add --help`
```
      --public
          Mark the dependency as public (unstable)

          The dependency can be referenced in your library's public API.

      --no-public
          Mark the dependency as private (unstable)

          While you can use the crate in your implementation, it cannot be referenced in your public API.
```
2024-01-11 21:13:02 +00:00
..
add-basic.in
add_basic refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
add_multiple refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
add_normalized_name_external refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
add_toolchain feat(cli): emit error when add is given a toolchain name instead of a crate name 2023-06-03 20:50:24 +07:00
build refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
build_prefer_existing_version refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
change_rename_target Fix issue-11010 2023-12-02 01:36:16 +08:00
cyclic_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
default_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
deprecated_default_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
deprecated_section refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
detect_workspace_inherit refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
detect_workspace_inherit_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
detect_workspace_inherit_optional Fix issue-11010 2023-12-02 01:36:16 +08:00
detect_workspace_inherit_public Add detect_workspace_inherit_public test case. 2023-12-01 11:22:26 +08:00
dev refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
dev_build_conflict refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
dev_prefer_existing_version refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
dry_run refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
empty_dep_name refactor: Validate via RegistryName/PackageName 2023-12-13 13:03:27 -06:00
empty_dep_table refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
features_activated_over_limit Display only feature list or summarized on cargo add 2023-09-19 13:14:44 -03:00
features_deactivated_over_limit Display only feature list or summarized on cargo add 2023-09-19 13:14:44 -03:00
features_empty refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
features_multiple_occurrences refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
features_preserve refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
features_spaced_values refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
features_unknown refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
features_unknown_no_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_branch refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_conflicts_namever refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_dev refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_inferred_name refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_inferred_name_multiple refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_multiple_names refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_multiple_packages_features Fixes #13121: Use Exact query during populating features. Update test 2023-12-29 10:03:54 +05:30
git_normalized_name refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_registry refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_rev refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
git_tag refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
help doc: add public info in cargo-add man page. 2024-01-11 15:11:08 +08:00
infer_prerelease refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_arg refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_git_name refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_key_inherit_dependency refactor: Rename test names to case for cargo_add 2023-02-20 11:25:14 -06:00
invalid_key_overwrite_inherit_dependency refactor: Rename test names to case for cargo_add 2023-02-20 11:25:14 -06:00
invalid_key_rename_inherit_dependency refactor: Rename test names to case for cargo_add 2023-02-20 11:25:14 -06:00
invalid_manifest feat: Add rustc style errors for manifest parsing 2023-12-15 13:30:10 -07:00
invalid_name_external refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_path refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_path_name refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_path_self refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_target_empty refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
invalid_vers refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
list_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
list_features_path refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
list_features_path_no_default refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
locked_changed refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
locked_unchanged refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
lockfile_updated refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
manifest_path_package refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
merge_activated_features refactor: Rename test names to case for cargo_add 2023-02-20 11:25:14 -06:00
multiple_conflicts_with_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
multiple_conflicts_with_rename refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
namever refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
no_args refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
no_default_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
no_optional Chore(test): remove unnecesary packages and versions for optionals tests 2023-12-04 11:25:38 +08:00
no_public chore: add lib.rs for new test cases 2023-12-01 10:21:33 +08:00
offline_empty_cache refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
optional Chore(test): remove unnecesary packages and versions for optionals tests 2023-12-04 11:25:38 +08:00
overwrite_default_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_default_features_with_no_default_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_git_with_path Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_inherit_features_noop refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_inherit_noop refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_inherit_optional_noop Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_inline_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_name_dev_noop refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_name_noop Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_no_default_features refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_no_default_features_with_default_features fix(add): Add back in some auto-formatting 2023-10-17 12:48:45 -05:00
overwrite_no_optional Chore(test): remove unnecesary packages and versions for optionals tests 2023-12-04 11:25:38 +08:00
overwrite_no_optional_with_optional Chore(test): remove unnecesary packages and versions for optionals tests 2023-12-04 11:25:38 +08:00
overwrite_no_public chore: add lib.rs for new test cases 2023-12-01 10:21:33 +08:00
overwrite_no_public_with_public chore: add lib.rs for new test cases 2023-12-01 10:21:33 +08:00
overwrite_optional Chore(test): remove unnecesary packages and versions for optionals tests 2023-12-04 11:25:38 +08:00
overwrite_optional_with_no_optional Chore(test): remove unnecesary packages and versions for optionals tests 2023-12-04 11:25:38 +08:00
overwrite_optional_with_optional Chore(test): remove unnecesary packages and versions for optionals tests 2023-12-04 11:25:38 +08:00
overwrite_path_noop Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_path_with_version Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_preserves_inline_table fix(add): Add back in some auto-formatting 2023-10-17 12:48:45 -05:00
overwrite_public chore: add lib.rs for new test cases 2023-12-01 10:21:33 +08:00
overwrite_public_with_no_public chore: add lib.rs for new test cases 2023-12-01 10:21:33 +08:00
overwrite_rename_with_no_rename refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_rename_with_rename refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_rename_with_rename_noop Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_version_with_git Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_version_with_path Fix issue-11010 2023-12-02 01:36:16 +08:00
overwrite_with_rename refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_workspace_dep refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
overwrite_workspace_dep_features fix(add): Add back in some auto-formatting 2023-10-17 12:48:45 -05:00
path refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
path_dev refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
path_inferred_name refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
path_inferred_name_conflicts_full_feature refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
path_normalized_name refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
preserve_dep_std_table fix(add): Stop auto-formatting content 2023-10-17 12:48:08 -05:00
preserve_features_table fix(add): Add back in some auto-formatting 2023-10-17 12:48:45 -05:00
preserve_sorted refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
preserve_unsorted refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
public chore: add lib.rs for new test cases 2023-12-01 10:21:33 +08:00
quiet refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
registry refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
rename refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
require_weak fix(add): Add back in some auto-formatting 2023-10-17 12:48:45 -05:00
rust_version_ignore fix(resolver): Prefer MSRV, rather than ignore incompatible 2023-11-14 14:56:58 -06:00
rust_version_incompatible refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
rust_version_latest refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
rust_version_older refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
sorted_table_with_dotted_item refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
target refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
target_cfg refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
unknown_inherited_feature refactor: Rename test names to case for cargo_add 2023-02-20 11:25:14 -06:00
vers refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
workspace_name refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
workspace_path refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
workspace_path_dev refactor(tests): Reduce cargo-add setup load 2023-05-26 09:24:45 -05:00
mod.rs add test expecting failure: adding features from git repo w multiple packages 2023-12-29 04:54:50 +05:30