use super::super::defs::*;
#[test]
fn condstore_bad_usage() {
let setup = set_up();
let mut client = setup.connect("7162bacs");
quick_log_in(&mut client);
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"SELECT INBOX (CONDSTORE CONDSTORE)",
);
quick_select(&mut client, "INBOX");
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"FETCH 1 UID (CHANGEDSINCE 1 CHANGEDSINCE 2)",
);
}
#[test]
fn qresync_bad_usage() {
let setup = set_up();
let mut client = setup.connect("7162baqr");
quick_log_in(&mut client);
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"SELECT INBOX (QRESYNC (1 2))",
);
quick_select(&mut client, "INBOX");
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"UID FETCH 1 UID (CHANGEDSINCE 1 VANISHED)",
);
let mut client = setup.connect("7162baqr");
quick_log_in(&mut client);
ok_command!(client, c("ENABLE QRESYNC"));
assert_bad_command(
&mut client,
Some(s::RespTextCode::Parse(())),
"SELECT INBOX (QRESYNC (1 2 1:*))",
);
assert_bad_command(
&mut client,
Some(s::RespTextCode::Parse(())),
"SELECT INBOX (QRESYNC (1 2 :1))",
);
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"SELECT INBOX (QRESYNC (1 2 (1:3 1:2)))",
);
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"SELECT INBOX (QRESYNC (1 2) QRESYNC (1 2))",
);
quick_select(&mut client, "INBOX");
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"UID FETCH 1 UID (VANISHED)",
);
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"UID FETCH 1 UID (CHANGEDSINCE 1 VANISHED VANISHED)",
);
assert_bad_command(
&mut client,
Some(s::RespTextCode::ClientBug(())),
"FETCH 1 UID (CHANGEDSINCE 1 VANISHED)",
);
}