melib/tests: merge integration tests in one crate
Saves about 0.5 seconds from compilation and runtime. Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>pull/336/head
parent
0da97dd8c1
commit
73d5b24e98
|
@ -42,7 +42,7 @@ fn test_build_draft() {
|
|||
|
||||
let raw = raw.replace(boundary_str, "");
|
||||
|
||||
let mut gz = GzDecoder::new(include_bytes!("./data/generated_email.eml.gz").as_slice());
|
||||
let mut gz = GzDecoder::new(include_bytes!("../data/generated_email.eml.gz").as_slice());
|
||||
let mut s = String::new();
|
||||
gz.read_to_string(&mut s).unwrap();
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// meli
|
||||
//
|
||||
// Copyright 2019 Manos Pitsidianakis
|
||||
//
|
||||
// This file is part of meli.
|
||||
//
|
||||
// meli is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// meli is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with meli. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
mod generating_email;
|
||||
mod mbox_parse;
|
||||
|
||||
fn main() {}
|
|
@ -38,10 +38,11 @@ fn test_mbox_parse() {
|
|||
}
|
||||
|
||||
{
|
||||
let sha1dc_diet_op =
|
||||
gz_to_string(include_bytes!("./data/PATCH-Put-sha1dc-on-a-diet_op.mbox.gz").as_slice());
|
||||
let sha1dc_diet_op = gz_to_string(
|
||||
include_bytes!("../data/PATCH-Put-sha1dc-on-a-diet_op.mbox.gz").as_slice(),
|
||||
);
|
||||
let sha1dc_diet_thread =
|
||||
gz_to_string(include_bytes!("./data/PATCH-Put-sha1dc-on-a-diet.mbox.gz").as_slice());
|
||||
gz_to_string(include_bytes!("../data/PATCH-Put-sha1dc-on-a-diet.mbox.gz").as_slice());
|
||||
|
||||
let message_iter = MessageIterator {
|
||||
index: Arc::new(Mutex::new(HashMap::default())),
|
||||
|
@ -70,10 +71,10 @@ fn test_mbox_parse() {
|
|||
|
||||
{
|
||||
let git_am_op = gz_to_string(
|
||||
include_bytes!("./data/git-am-breakage-with-MIME-decoding_op.mbox.gz").as_slice(),
|
||||
include_bytes!("../data/git-am-breakage-with-MIME-decoding_op.mbox.gz").as_slice(),
|
||||
);
|
||||
let git_am_thread = gz_to_string(
|
||||
include_bytes!("./data/git-am-breakage-with-MIME-decoding.mbox.gz").as_slice(),
|
||||
include_bytes!("../data/git-am-breakage-with-MIME-decoding.mbox.gz").as_slice(),
|
||||
);
|
||||
|
||||
let message_iter = MessageIterator {
|
Loading…
Reference in New Issue