summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse/packet_parser_builder.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-05-14 17:45:20 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-05-14 17:47:02 +0200
commit4ee3a3be827986c515c4a89a19ddae870376486b (patch)
treee1879fa6400e72c0ea393c62df9495cc57b61e1a /openpgp/src/parse/packet_parser_builder.rs
parent5206143171ded4717d6526989ef160028e719058 (diff)
openpgp: Clean up test data handling.
- Use the new framework instead of including the files everywhere.
Diffstat (limited to 'openpgp/src/parse/packet_parser_builder.rs')
-rw-r--r--openpgp/src/parse/packet_parser_builder.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/openpgp/src/parse/packet_parser_builder.rs b/openpgp/src/parse/packet_parser_builder.rs
index 514cb6f2..c17a6f93 100644
--- a/openpgp/src/parse/packet_parser_builder.rs
+++ b/openpgp/src/parse/packet_parser_builder.rs
@@ -201,14 +201,10 @@ impl<'a> PacketParserBuilder<'a> {
mod tests {
use super::*;
- macro_rules! bytes {
- ( $x:expr ) => { include_bytes!(concat!("../../tests/data/messages/", $x)) };
- }
-
#[test]
fn armor() {
// Not ASCII armor encoded data.
- let msg = bytes!("sig.gpg");
+ let msg = ::tests::message("sig.gpg");
// Make sure we can read the first packet.
let ppr = PacketParserBuilder::from_bytes(msg).unwrap()
@@ -233,7 +229,7 @@ mod tests {
assert_match!(Ok(PacketParserResult::EOF(ref _pp)) = ppr);
// ASCII armor encoded data.
- let msg = bytes!("a-cypherpunks-manifesto.txt.ed25519.sig");
+ let msg = ::tests::message("a-cypherpunks-manifesto.txt.ed25519.sig");
// Make sure we can read the first packet.
let ppr = PacketParserBuilder::from_bytes(msg).unwrap()