From 43618954766a2ba525541501422bb6e7d5ccc913 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Sat, 9 Jan 2021 13:08:03 +0100 Subject: fix: don't error on version and help flag (#9064) --- cli/tests/integration_tests.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'cli/tests') 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 @@ -63,6 +63,42 @@ fn std_lint() { assert!(status.success()); } +#[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() -- cgit v1.2.3