use super::defs::*;
#[test]
fn capability_declared() {
test_require_capability("4978capa", "COMPRESS=DEFLATE");
}
#[test]
fn compress() {
let setup = set_up();
let mut client = setup.connect("4978comp");
ok_command!(client, c("COMPRESS DEFLATE"));
let mut client = client.compress();
ok_command!(client, c("LOGIN azure hunter2"));
command!(mut responses = client, c("SELECT INBOX"));
assert_tagged_ok_any(responses.pop().unwrap());
has_untagged_response_matching! {
s::Response::Exists(0) in responses
};
command!([response] = client, c("COMPRESS DEFLATE"));
assert_matches!(
s::Response::Cond(s::CondResponse {
cond: s::RespCondType::No,
code: Some(s::RespTextCode::CompressionActive(())),
quip: _,
}),
response.response
);
}