cargo/tests/testsuite/cargo_new
David Calavera 1a8bfdf0cf Update workspace manifest with new members.
When a user runs `cargo new` or `cargo init` within a workspace, Cargo will automatically add the new package to the members list in the workspace if necessary. The heuristic to add the new package is as follows:

- If there is no `members` list in the workspace yet, a new `members` list is created.
- If there is an `exclude` statement, Cargo checks if the new package should be excluded. If it doesn't match the `exclude` list, the package is added to the `members` list.
- If there is a glob expression in the `members` list that matches the new package, the package is not added to the `members` list.
- If the existent `members` list is sorted, Cargo tries to preserve the ordering when it adds the new package.

This change doesn't try to format the resulting `members` list in any way, leaving the formatting decissions to the user.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2023-10-28 07:42:23 -07:00
..
add_members_to_workspace_format_previous_items Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00
add_members_to_workspace_format_sorted Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00
add_members_to_workspace_with_absolute_package_path Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00
add_members_to_workspace_with_empty_members Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00
add_members_to_workspace_with_exclude_list Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00
add_members_to_workspace_with_members_glob Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00
help fix(help): Consistently use SCREAMING_CASE for value names 2023-10-17 16:47:44 -05:00
inherit_workspace_lints feat: Stabilize lints 2023-09-08 10:44:00 -05:00
inherit_workspace_package_table Update cargo new workspace inheritance tests to specify resolver 2023-05-26 17:14:34 +02:00
inherit_workspace_package_table.in Update cargo new workspace inheritance tests to specify resolver 2023-05-26 17:14:34 +02:00
inherit_workspace_package_table_with_edition Update cargo new workspace inheritance tests to specify resolver 2023-05-26 17:14:34 +02:00
inherit_workspace_package_table_with_registry Update cargo new workspace inheritance tests to specify resolver 2023-05-26 17:14:34 +02:00
inherit_workspace_package_table_without_version Add tests for inherit_workspace_package_table 2023-05-23 10:36:08 +08:00
not_inherit_workspace_package_table_if_not_members Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00
mod.rs Update workspace manifest with new members. 2023-10-28 07:42:23 -07:00