From 5c3b534101c059fda0d40943b6345a1ee2ce9d96 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 3 Jun 2024 10:39:53 -0500 Subject: [PATCH 1/2] test(add): Show quoting behavior for --target --- tests/testsuite/cargo_add/target_cfg/mod.rs | 2 +- tests/testsuite/cargo_add/target_cfg/out/Cargo.toml | 2 +- tests/testsuite/cargo_add/target_cfg/stderr.term.svg | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testsuite/cargo_add/target_cfg/mod.rs b/tests/testsuite/cargo_add/target_cfg/mod.rs index 762816b033a..90acfc246e4 100644 --- a/tests/testsuite/cargo_add/target_cfg/mod.rs +++ b/tests/testsuite/cargo_add/target_cfg/mod.rs @@ -28,7 +28,7 @@ fn case() { snapbox::cmd::Command::cargo_ui() .arg("add") - .arg_line("my-package1 my-package2 --target cfg(unix)") + .arg_line("my-package1 my-package2 --target 'cfg(target_os=\"linux\")'") .current_dir(cwd) .assert() .success() diff --git a/tests/testsuite/cargo_add/target_cfg/out/Cargo.toml b/tests/testsuite/cargo_add/target_cfg/out/Cargo.toml index 7779fcabdfa..f8fde854e1e 100644 --- a/tests/testsuite/cargo_add/target_cfg/out/Cargo.toml +++ b/tests/testsuite/cargo_add/target_cfg/out/Cargo.toml @@ -5,6 +5,6 @@ name = "cargo-list-test-fixture" version = "0.0.0" edition = "2015" -[target."cfg(unix)".dependencies] +[target."cfg(target_os=/"linux/")".dependencies] my-package1 = "99999.0.0" my-package2 = "99999.0.0" diff --git a/tests/testsuite/cargo_add/target_cfg/stderr.term.svg b/tests/testsuite/cargo_add/target_cfg/stderr.term.svg index 5a05eb01b5a..491ed799125 100644 --- a/tests/testsuite/cargo_add/target_cfg/stderr.term.svg +++ b/tests/testsuite/cargo_add/target_cfg/stderr.term.svg @@ -1,4 +1,4 @@ - +