From 60a7eee0bb6b19237d3937a231da289f56279ff3 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 20 Jul 2022 12:32:58 +0200 Subject: Reorganize tests a bit --- Cargo.lock | 43 +++++++++++- Cargo.toml | 6 ++ tests/parsing-crates/.gitignore | 1 - tests/parsing-crates/Cargo.lock | 131 ------------------------------------ tests/parsing-crates/Cargo.toml | 17 ----- tests/parsing-crates/mail_parser.rs | 5 +- tests/parsing-crates/main.rs | 5 -- 7 files changed, 51 insertions(+), 157 deletions(-) delete mode 100644 tests/parsing-crates/.gitignore delete mode 100644 tests/parsing-crates/Cargo.lock delete mode 100644 tests/parsing-crates/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index f54e742..2c9a088 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,11 @@ dependencies = [ "lazy_static", "ldap3", "log", - "mail-parser", + "mail-parser 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mail-parser 0.4.8 (git+https://github.com/superboum/mail-parser?branch=feature/no_decode)", + "mail-parser 0.4.8 (git+https://github.com/superboum/mail-parser?rev=db61a03)", + "mail-parser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mail-parser 0.5.0 (git+https://github.com/stalwartlabs/mail-parser?branch=main)", "pretty_env_logger", "rand", "rmp-serde", @@ -1373,6 +1377,43 @@ dependencies = [ "serde", ] +[[package]] +name = "mail-parser" +version = "0.4.8" +source = "git+https://github.com/superboum/mail-parser?branch=feature/no_decode#0fe5fe071f25016d9c1232eb452c0c4bbfa8a445" +dependencies = [ + "encoding_rs", + "serde", +] + +[[package]] +name = "mail-parser" +version = "0.4.8" +source = "git+https://github.com/superboum/mail-parser?rev=db61a03#db61a0364c00d3cf115f20c6d195bfa4594c53ff" +dependencies = [ + "encoding_rs", + "serde", +] + +[[package]] +name = "mail-parser" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e25e9e9cd1360538e0ca33499f12fd180f3611d7a8e1a50b7e4e43a4c5dd4b7" +dependencies = [ + "encoding_rs", + "serde", +] + +[[package]] +name = "mail-parser" +version = "0.5.0" +source = "git+https://github.com/stalwartlabs/mail-parser?branch=main#bb0e3366daabec8d2f94afd22c661394f9ba7cbe" +dependencies = [ + "encoding_rs", + "serde", +] + [[package]] name = "matches" version = "0.1.9" diff --git a/Cargo.toml b/Cargo.toml index 4130ef1..174c72c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,3 +50,9 @@ smtp-message = { git = "http://github.com/Alexis211/kannader", branch = "feature smtp-server = { git = "http://github.com/Alexis211/kannader", branch = "feature/lmtp" } #k2v-client = { path = "../garage/src/k2v-client" } + +[dev-dependencies] +mail-parser-05 = { package = "mail-parser", version = "0.5" } +mail-parser-main = { package = "mail-parser", git = "https://github.com/stalwartlabs/mail-parser", branch = "main" } +mail-parser-superboum = { package = "mail-parser", git = "https://github.com/superboum/mail-parser", branch = "feature/no_decode" } +mail-parser-db61a03 = { package = "mail-parser", git = "https://github.com/superboum/mail-parser", rev = "db61a03" } diff --git a/tests/parsing-crates/.gitignore b/tests/parsing-crates/.gitignore deleted file mode 100644 index eb5a316..0000000 --- a/tests/parsing-crates/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/tests/parsing-crates/Cargo.lock b/tests/parsing-crates/Cargo.lock deleted file mode 100644 index 4c47568..0000000 --- a/tests/parsing-crates/Cargo.lock +++ /dev/null @@ -1,131 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "encoding_rs" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "mail-parser" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c46a841ae5276aba5218ade7bb76896358f9f95a925c7b3deea6a0ec0fb8e2a7" -dependencies = [ - "encoding_rs", - "serde", -] - -[[package]] -name = "mail-parser" -version = "0.4.8" -source = "git+https://github.com/superboum/mail-parser?branch=feature/no_decode#0fe5fe071f25016d9c1232eb452c0c4bbfa8a445" -dependencies = [ - "encoding_rs", - "serde", -] - -[[package]] -name = "mail-parser" -version = "0.4.8" -source = "git+https://github.com/superboum/mail-parser?rev=db61a03#db61a0364c00d3cf115f20c6d195bfa4594c53ff" -dependencies = [ - "encoding_rs", - "serde", -] - -[[package]] -name = "mail-parser" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e25e9e9cd1360538e0ca33499f12fd180f3611d7a8e1a50b7e4e43a4c5dd4b7" -dependencies = [ - "encoding_rs", - "serde", -] - -[[package]] -name = "mail-parser" -version = "0.5.0" -source = "git+https://github.com/stalwartlabs/mail-parser?branch=main#bb0e3366daabec8d2f94afd22c661394f9ba7cbe" -dependencies = [ - "encoding_rs", - "serde", -] - -[[package]] -name = "parsing-crates" -version = "0.1.0" -dependencies = [ - "mail-parser 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mail-parser 0.4.8 (git+https://github.com/superboum/mail-parser?branch=feature/no_decode)", - "mail-parser 0.4.8 (git+https://github.com/superboum/mail-parser?rev=db61a03)", - "mail-parser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mail-parser 0.5.0 (git+https://github.com/stalwartlabs/mail-parser?branch=main)", -] - -[[package]] -name = "proc-macro2" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "serde" -version = "1.0.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "syn" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" diff --git a/tests/parsing-crates/Cargo.toml b/tests/parsing-crates/Cargo.toml deleted file mode 100644 index 3971a75..0000000 --- a/tests/parsing-crates/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "parsing-crates" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[[bin]] -name = "parsing-crates-teste" -path = "main.rs" - -[dependencies] -mail-parser-05 = { package = "mail-parser", version = "0.5" } -mail-parser-048 = { package = "mail-parser", version = "0.4.8" } -mail-parser-main = { package = "mail-parser", git = "https://github.com/stalwartlabs/mail-parser", branch = "main" } -mail-parser-superboum = { package = "mail-parser", git = "https://github.com/superboum/mail-parser", branch = "feature/no_decode" } -mail-parser-db61a03 = { package = "mail-parser", git = "https://github.com/superboum/mail-parser", rev = "db61a03" } diff --git a/tests/parsing-crates/mail_parser.rs b/tests/parsing-crates/mail_parser.rs index 8b277a3..22ebc2d 100644 --- a/tests/parsing-crates/mail_parser.rs +++ b/tests/parsing-crates/mail_parser.rs @@ -1,6 +1,7 @@ -use mail_parser_superboum::Message; // FAIL +//use mail_parser_superboum::Message; // FAIL + +use mail_parser::Message; // PASS -//use mail_parser_048::Message; // PASS //use mail_parser_05::Message; // PASS //use mail_parser_main::Message; // PASS //use mail_parser_db61a03::Message; // PASS diff --git a/tests/parsing-crates/main.rs b/tests/parsing-crates/main.rs index 84bd57d..7ebf793 100644 --- a/tests/parsing-crates/main.rs +++ b/tests/parsing-crates/main.rs @@ -1,6 +1 @@ -#[cfg(test)] mod mail_parser; - -fn main() { - println!("Hello, world!"); -} -- cgit v1.2.3