diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2022-07-22 16:46:55 +0000 |
---|---|---|
committer | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2022-08-22 10:51:17 +0000 |
commit | 3c0d0cfffe6a647ff91bd74ebe0c3085032fc646 (patch) | |
tree | 043fb3b297829b8818b9af5144728e1835535ab1 | |
parent | Use `mime` for content type (diff) | |
download | miniserve-3c0d0cfffe6a647ff91bd74ebe0c3085032fc646.tar.gz miniserve-3c0d0cfffe6a647ff91bd74ebe0c3085032fc646.zip |
Disable broken tests for Windows
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | tests/qrcode.rs | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -69,7 +69,6 @@ tls = ["rustls", "rustls-pemfile", "actix-web/rustls"] [dev-dependencies] assert_cmd = "2" assert_fs = "1" -fake-tty = "0.2.0" predicates = "2" pretty_assertions = "1.2" regex = "1" @@ -78,5 +77,9 @@ rstest = "0.15" select = "0.5" url = "2" +[target.'cfg(not(windows))'.dev-dependencies] +# fake_tty does not support Windows for now +fake-tty = "0.2.0" + [build-dependencies] grass = "0.11" diff --git a/tests/qrcode.rs b/tests/qrcode.rs index eb37abc..21dae6a 100644 --- a/tests/qrcode.rs +++ b/tests/qrcode.rs @@ -9,6 +9,7 @@ use std::process::Command; use std::thread::sleep; use std::time::Duration; +#[cfg(not(windows))] fn run_in_faketty_kill_and_get_stdout(template: &Command) -> Result<String, Error> { use fake_tty::{bash_command, get_stdout}; @@ -33,6 +34,8 @@ fn run_in_faketty_kill_and_get_stdout(template: &Command) -> Result<String, Erro } #[rstest] +// Disabled for Windows because `fake_tty` does not currently support it. +#[cfg(not(windows))] fn qrcode_hidden_in_tty_when_disabled(tmpdir: TempDir, port: u16) -> Result<(), Error> { let mut template = Command::cargo_bin("miniserve")?; template.arg("-p").arg(port.to_string()).arg(tmpdir.path()); @@ -44,6 +47,8 @@ fn qrcode_hidden_in_tty_when_disabled(tmpdir: TempDir, port: u16) -> Result<(), } #[rstest] +// Disabled for Windows because `fake_tty` does not currently support it. +#[cfg(not(windows))] fn qrcode_shown_in_tty_when_enabled(tmpdir: TempDir, port: u16) -> Result<(), Error> { let mut template = Command::cargo_bin("miniserve")?; template |