Skip to content

Commit a6ca281

Browse files
committed
chore: add lib.rs for new test cases
1 parent 7034461 commit a6ca281

File tree

20 files changed

+5
-40
lines changed

20 files changed

+5
-40
lines changed

src/bin/cargo/commands/add.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ The package will be removed from your features.")
6767
.conflicts_with("build")
6868
.long_help("Mark the dependency as public
6969
70-
The dependnecy will be visible in both of your crate and outside."),
70+
The dependency can be referenced in your library's public API."),
7171
flag("no-public", "Mark the dependency as private")
7272
.conflicts_with("dev")
7373
.conflicts_with("build")
7474
.overrides_with("public")
7575
.long_help("Mark the dependency as private
7676
77-
The dependnecy will be only visible in your crate other than outside."),
77+
While you can use the crate in your implementation, it cannot be referenced in your public API."),
7878
clap::Arg::new("rename")
7979
.long("rename")
8080
.action(ArgAction::Set)

tests/testsuite/cargo_add/help/stdout.log

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ Options:
3535
--public
3636
Mark the dependency as public
3737

38-
The dependnecy will be visible in both of your crate and outside.
38+
The dependency can be referenced in your library's public API.
3939

4040
--no-public
4141
Mark the dependency as private
4242

43-
The dependnecy will be only visible in your crate other than outside.
43+
While you can use the crate in your implementation, it cannot be referenced in your public
44+
API.
4445

4546
--rename <NAME>
4647
Rename the dependency
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
cargo-features = ["public-dependency"]
22
[workspace]
33

4-
[lib]
5-
path = "../../add_basic.in/src/lib.rs"
6-
74
[package]
85
name = "cargo-list-test-fixture"
96
version = "0.0.0"

tests/testsuite/cargo_add/no_public/in/src/lib.rs

Whitespace-only changes.

tests/testsuite/cargo_add/no_public/out/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
cargo-features = ["public-dependency"]
22
[workspace]
33

4-
[lib]
5-
path = "../../add_basic.in/src/lib.rs"
6-
74
[package]
85
name = "cargo-list-test-fixture"
96
version = "0.0.0"

tests/testsuite/cargo_add/overwrite_no_public/in/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
cargo-features = ["public-dependency"]
22
[workspace]
33

4-
[lib]
5-
path = "../../add_basic.in/src/lib.rs"
6-
74
[package]
85
name = "cargo-list-test-fixture"
96
version = "0.0.0"

tests/testsuite/cargo_add/overwrite_no_public/in/src/lib.rs

Whitespace-only changes.

tests/testsuite/cargo_add/overwrite_no_public/out/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
cargo-features = ["public-dependency"]
22
[workspace]
33

4-
[lib]
5-
path = "../../add_basic.in/src/lib.rs"
6-
74
[package]
85
name = "cargo-list-test-fixture"
96
version = "0.0.0"

tests/testsuite/cargo_add/overwrite_no_public_with_public/in/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
cargo-features = ["public-dependency"]
22
[workspace]
33

4-
[lib]
5-
path = "../../add_basic.in/src/lib.rs"
6-
74
[package]
85
name = "cargo-list-test-fixture"
96
version = "0.0.0"

tests/testsuite/cargo_add/overwrite_no_public_with_public/in/src/lib.rs

Whitespace-only changes.

0 commit comments

Comments
 (0)