aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml5
-rw-r--r--tests/qrcode.rs5
2 files changed, 9 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 1bac97e..1876320 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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