aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-03-11 21:02:24 -0500
committerJesse Luehrs <doy@tozt.net>2022-03-11 21:02:24 -0500
commit84f04ac0819e80c829db25f558b66843424f8c48 (patch)
tree87aa794ab670893dd618e68144c598e960fd7e5a
parentb2733e64d900ac237211360848326f3c4caa23f5 (diff)
downloadpty-process-84f04ac0819e80c829db25f558b66843424f8c48.tar.gz
pty-process-84f04ac0819e80c829db25f558b66843424f8c48.zip
use tokio::test
-rw-r--r--tests/basic.rs6
-rw-r--r--tests/behavior.rs12
-rw-r--r--tests/pipe.rs3
-rw-r--r--tests/split.rs9
-rw-r--r--tests/winch.rs3
5 files changed, 11 insertions, 22 deletions
diff --git a/tests/basic.rs b/tests/basic.rs
index fd74463..f6faa2e 100644
--- a/tests/basic.rs
+++ b/tests/basic.rs
@@ -22,8 +22,7 @@ fn test_cat_blocking() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_cat_async() {
use futures::stream::StreamExt as _;
use tokio::io::AsyncWriteExt as _;
@@ -47,8 +46,7 @@ async fn test_cat_async() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_yes_async() {
use tokio::io::AsyncReadExt as _;
diff --git a/tests/behavior.rs b/tests/behavior.rs
index bb40e35..ee51cb4 100644
--- a/tests/behavior.rs
+++ b/tests/behavior.rs
@@ -29,8 +29,7 @@ fn test_multiple() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_multiple_async() {
use futures::stream::StreamExt as _;
@@ -133,8 +132,7 @@ fn test_multiple_configured() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_multiple_configured_async() {
use futures::stream::StreamExt as _;
use std::os::unix::io::FromRawFd as _;
@@ -245,8 +243,7 @@ fn test_controlling_terminal() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_controlling_terminal_async() {
use futures::stream::StreamExt as _;
@@ -287,8 +284,7 @@ fn test_session_leader() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_session_leader_async() {
use futures::stream::StreamExt as _;
diff --git a/tests/pipe.rs b/tests/pipe.rs
index cbe42ad..c3d7b9f 100644
--- a/tests/pipe.rs
+++ b/tests/pipe.rs
@@ -60,8 +60,7 @@ fn test_pipe_blocking() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_pipe_async() {
use std::os::unix::io::FromRawFd as _;
use tokio::io::AsyncReadExt as _;
diff --git a/tests/split.rs b/tests/split.rs
index fc9b9d0..4799c13 100644
--- a/tests/split.rs
+++ b/tests/split.rs
@@ -1,8 +1,7 @@
mod helpers;
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_split() {
use futures::stream::StreamExt as _;
use tokio::io::AsyncWriteExt as _;
@@ -42,8 +41,7 @@ async fn test_split() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_into_split() {
use tokio::io::{AsyncBufReadExt as _, AsyncWriteExt as _};
@@ -111,8 +109,7 @@ async fn test_into_split() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_into_split_error() {
let pty1 = pty_process::Pty::new().unwrap();
let pty2 = pty_process::Pty::new().unwrap();
diff --git a/tests/winch.rs b/tests/winch.rs
index 63455e9..ae3c1a4 100644
--- a/tests/winch.rs
+++ b/tests/winch.rs
@@ -27,8 +27,7 @@ fn test_winch_std() {
}
#[cfg(feature = "async")]
-#[tokio::main]
-#[test]
+#[tokio::test]
async fn test_winch_async() {
use futures::stream::StreamExt as _;
use tokio::io::AsyncWriteExt as _;