diff options
| author | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2019-11-15 20:12:59 +0100 |
|---|---|---|
| committer | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2019-11-15 20:12:59 +0100 |
| commit | 084675fdfe1329cbd58a48f2306b7c61dec08834 (patch) | |
| tree | 258b77858a35e33dee77684817839858a06d26b4 /tests/fixtures.rs | |
| parent | 5d1bb582ae26ba83629bfd6fe0a8d64f816acfee (diff) | |
| download | mail-084675fdfe1329cbd58a48f2306b7c61dec08834.tar.gz | |
more tests for tags
Diffstat (limited to 'tests/fixtures.rs')
| -rw-r--r-- | tests/fixtures.rs | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/tests/fixtures.rs b/tests/fixtures.rs index c9e04c8..a8166be 100644 --- a/tests/fixtures.rs +++ b/tests/fixtures.rs @@ -147,16 +147,41 @@ impl MailBox { if seen { flags += "S"; } - self.maildir.store_cur_with_flags(&msg.message_to_string().unwrap().as_bytes(), flags.as_str()).unwrap() - }; + println!("flags: {:?}", flags); + let mid = self.maildir.store_cur_with_flags(&msg.message_to_string().unwrap().as_bytes(), flags.as_str()).unwrap(); + // I have no idea what the reasoning for the :2 here is, but ok. + format!("{}:2,{}", mid, flags) + }; + + // let mut flags = String::from(""); + // if flagged { + // flags += "F"; + // } + // if replied { + // flags += "R"; + // } + // if seen { + // flags += "S"; + // } + // println!("flags: {:?}", flags); + // let id = self.maildir.store_cur_with_flags(&msg.message_to_string().unwrap().as_bytes(), flags.as_str()).unwrap(); + + // if is_new { + // let msgpath = format!("{}{}", id, flags); + // std::fs::rename(msgpath, newpath)?; + + // self.maildir.path() + // } + + let mut msgpath = self.path(); msgpath = if is_new { msgpath.join("new") } else { msgpath.join("cur") }; - + msgpath = msgpath.join(&id); Ok((msg_id, msgpath)) |
