summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/cargo_test
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/tests/testsuite/cargo_test')
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_test/help/stdout.log2
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_test/mod.rs1
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/Cargo.toml3
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/src/lib.rs0
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/mod.rs19
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stderr.log7
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stdout.log0
7 files changed, 31 insertions, 1 deletions
diff --git a/src/tools/cargo/tests/testsuite/cargo_test/help/stdout.log b/src/tools/cargo/tests/testsuite/cargo_test/help/stdout.log
index d693dc3c9..5df62d6bb 100644
--- a/src/tools/cargo/tests/testsuite/cargo_test/help/stdout.log
+++ b/src/tools/cargo/tests/testsuite/cargo_test/help/stdout.log
@@ -48,7 +48,7 @@ Compilation Options:
-j, --jobs <N> Number of parallel jobs, defaults to # of CPUs.
-r, --release Build artifacts in release mode, with optimizations
--profile <PROFILE-NAME> Build artifacts with the specified profile
- --target <TRIPLE> Build for the target triple
+ --target [<TRIPLE>] Build for the target triple
--target-dir <DIRECTORY> Directory for all generated artifacts
--unit-graph Output build graph in JSON (unstable)
--timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json
diff --git a/src/tools/cargo/tests/testsuite/cargo_test/mod.rs b/src/tools/cargo/tests/testsuite/cargo_test/mod.rs
index c0ce11180..28be9d1a7 100644
--- a/src/tools/cargo/tests/testsuite/cargo_test/mod.rs
+++ b/src/tools/cargo/tests/testsuite/cargo_test/mod.rs
@@ -1 +1,2 @@
mod help;
+mod no_keep_going;
diff --git a/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/Cargo.toml
new file mode 100644
index 000000000..c35d63273
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/Cargo.toml
@@ -0,0 +1,3 @@
+[package]
+name = "foo"
+version = "0.1.0"
diff --git a/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/src/lib.rs b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/src/lib.rs
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/in/src/lib.rs
diff --git a/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/mod.rs b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/mod.rs
new file mode 100644
index 000000000..fdec61642
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/mod.rs
@@ -0,0 +1,19 @@
+use cargo_test_support::curr_dir;
+use cargo_test_support::CargoCommand;
+use cargo_test_support::Project;
+
+#[cargo_test]
+fn case() {
+ let project = Project::from_template(curr_dir!().join("in"));
+ let project_root = project.root();
+ let cwd = &project_root;
+
+ snapbox::cmd::Command::cargo_ui()
+ .arg("test")
+ .arg("--keep-going")
+ .current_dir(cwd)
+ .assert()
+ .code(1)
+ .stdout_matches_path(curr_dir!().join("stdout.log"))
+ .stderr_matches_path(curr_dir!().join("stderr.log"));
+}
diff --git a/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stderr.log b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stderr.log
new file mode 100644
index 000000000..fd4ca9b2a
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stderr.log
@@ -0,0 +1,7 @@
+error: unexpected argument '--keep-going' found
+
+ tip: use `--no-fail-fast` to run as many tests as possible regardless of failure
+
+Usage: cargo[EXE] test [OPTIONS] [TESTNAME] [-- [args]...]
+
+For more information, try '--help'.
diff --git a/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stdout.log b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stdout.log
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_test/no_keep_going/stdout.log