mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 06:56:29 +03:00
test: make plaintext to HTML conversion tests non-async
This commit is contained in:
@@ -107,8 +107,8 @@ impl PlainText {
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_plain_to_html() {
|
||||
#[test]
|
||||
fn test_plain_to_html() {
|
||||
let html = PlainText {
|
||||
text: r##"line 1
|
||||
line 2
|
||||
@@ -137,8 +137,8 @@ line with <a href="https://link-mid-of-line.org">https://link-mid-of-line.org</a
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_plain_to_html_encapsulated() {
|
||||
#[test]
|
||||
fn test_plain_to_html_encapsulated() {
|
||||
let html = PlainText {
|
||||
text: r#"line with <http://encapsulated.link/?foo=_bar> here!"#.to_string(),
|
||||
flowed: false,
|
||||
@@ -158,8 +158,8 @@ line with <<a href="http://encapsulated.link/?foo=_bar">http://encapsulated.l
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_plain_to_html_nolink() {
|
||||
#[test]
|
||||
fn test_plain_to_html_nolink() {
|
||||
let html = PlainText {
|
||||
text: r#"line with nohttp://no.link here"#.to_string(),
|
||||
flowed: false,
|
||||
@@ -179,8 +179,8 @@ line with nohttp://no.link here<br/>
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_plain_to_html_mailto() {
|
||||
#[test]
|
||||
fn test_plain_to_html_mailto() {
|
||||
let html = PlainText {
|
||||
text: r#"just an address: foo@bar.org another@one.de"#.to_string(),
|
||||
flowed: false,
|
||||
@@ -200,8 +200,8 @@ just an address: <a href="mailto:foo@bar.org">foo@bar.org</a> <a href="mailto:an
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_plain_to_html_flowed() {
|
||||
#[test]
|
||||
fn test_plain_to_html_flowed() {
|
||||
let html = PlainText {
|
||||
text: "line \nstill line\n>quote \n>still quote\n >no quote".to_string(),
|
||||
flowed: true,
|
||||
@@ -224,8 +224,8 @@ line still line<br/>
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_plain_to_html_flowed_delsp() {
|
||||
#[test]
|
||||
fn test_plain_to_html_flowed_delsp() {
|
||||
let html = PlainText {
|
||||
text: "line \nstill line\n>quote \n>still quote\n >no quote".to_string(),
|
||||
flowed: true,
|
||||
@@ -248,8 +248,8 @@ linestill line<br/>
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_plain_to_html_fixed() {
|
||||
#[test]
|
||||
fn test_plain_to_html_fixed() {
|
||||
let html = PlainText {
|
||||
text: "line \nstill line\n>quote \n>still quote\n >no quote".to_string(),
|
||||
flowed: false,
|
||||
|
||||
Reference in New Issue
Block a user