summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/init/path_contains_separator
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/tests/testsuite/init/path_contains_separator')
-rw-r--r--src/tools/cargo/tests/testsuite/init/path_contains_separator/in/.keep0
-rw-r--r--src/tools/cargo/tests/testsuite/init/path_contains_separator/mod.rs26
-rw-r--r--src/tools/cargo/tests/testsuite/init/path_contains_separator/out/Cargo.toml8
-rw-r--r--src/tools/cargo/tests/testsuite/init/path_contains_separator/out/src/main.rs3
-rw-r--r--src/tools/cargo/tests/testsuite/init/path_contains_separator/stderr.log3
-rw-r--r--src/tools/cargo/tests/testsuite/init/path_contains_separator/stdout.log0
6 files changed, 40 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/init/path_contains_separator/in/.keep b/src/tools/cargo/tests/testsuite/init/path_contains_separator/in/.keep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/init/path_contains_separator/in/.keep
diff --git a/src/tools/cargo/tests/testsuite/init/path_contains_separator/mod.rs b/src/tools/cargo/tests/testsuite/init/path_contains_separator/mod.rs
new file mode 100644
index 000000000..0a12f4269
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/init/path_contains_separator/mod.rs
@@ -0,0 +1,26 @@
+use cargo_test_support::compare::assert_ui;
+use cargo_test_support::prelude::*;
+use cargo_test_support::{t, Project};
+
+use cargo_test_support::curr_dir;
+
+#[cargo_test]
+fn case() {
+ let project = Project::from_template(curr_dir!().join("in"));
+ let project_root = &project.root().join("test:ing");
+
+ if !project_root.exists() {
+ t!(std::fs::create_dir(&project_root));
+ }
+
+ snapbox::cmd::Command::cargo_ui()
+ .arg_line("init --bin --vcs none --edition 2015 --name testing")
+ .current_dir(project_root)
+ .assert()
+ .success()
+ .stdout_matches_path(curr_dir!().join("stdout.log"))
+ .stderr_matches_path(curr_dir!().join("stderr.log"));
+
+ assert_ui().subset_matches(curr_dir!().join("out"), project_root);
+ assert!(!project_root.join(".gitignore").is_file());
+}
diff --git a/src/tools/cargo/tests/testsuite/init/path_contains_separator/out/Cargo.toml b/src/tools/cargo/tests/testsuite/init/path_contains_separator/out/Cargo.toml
new file mode 100644
index 000000000..11465f1fc
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/init/path_contains_separator/out/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "testing"
+version = "0.1.0"
+edition = "2015"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/src/tools/cargo/tests/testsuite/init/path_contains_separator/out/src/main.rs b/src/tools/cargo/tests/testsuite/init/path_contains_separator/out/src/main.rs
new file mode 100644
index 000000000..e7a11a969
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/init/path_contains_separator/out/src/main.rs
@@ -0,0 +1,3 @@
+fn main() {
+ println!("Hello, world!");
+}
diff --git a/src/tools/cargo/tests/testsuite/init/path_contains_separator/stderr.log b/src/tools/cargo/tests/testsuite/init/path_contains_separator/stderr.log
new file mode 100644
index 000000000..d7947aea2
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/init/path_contains_separator/stderr.log
@@ -0,0 +1,3 @@
+warning: the path `[ROOT]/case/test:ing/.` contains invalid PATH characters (usually `:`, `;`, or `"`)
+It is recommended to use a different name to avoid problems.
+ Created binary (application) package
diff --git a/src/tools/cargo/tests/testsuite/init/path_contains_separator/stdout.log b/src/tools/cargo/tests/testsuite/init/path_contains_separator/stdout.log
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/init/path_contains_separator/stdout.log