summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-01-09 13:08:03 +0100
committerGitHub <noreply@github.com>2021-01-09 13:08:03 +0100
commit43618954766a2ba525541501422bb6e7d5ccc913 (patch)
tree0888ff00f10667acdb3c149465346767e80f0458 /cli/tests
parent6d7da6309eb73905ebc86ba2820c741670ac0fd3 (diff)
fix: don't error on version and help flag (#9064)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration_tests.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 20e391171..df55b5e7c 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -64,6 +64,42 @@ fn std_lint() {
}
#[test]
+fn help_flag() {
+ let status = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("--help")
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+ assert!(status.success());
+}
+
+#[test]
+fn version_short_flag() {
+ let status = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("-V")
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+ assert!(status.success());
+}
+
+#[test]
+fn version_long_flag() {
+ let status = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("--version")
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+ assert!(status.success());
+}
+
+#[test]
fn unit_test_lint() {
let status = util::deno_cmd()
.arg("lint")