Fixed build.

This commit is contained in:
Aaron Weiss 2014-12-23 12:15:41 -05:00
parent 06cd54f39e
commit b44ff8b196
4 changed files with 3 additions and 28 deletions

View file

@ -24,7 +24,7 @@ fn main() {
if message.command[] == "PRIVMSG" {
if let Some(msg) = message.suffix {
if msg.contains("pickles") {
server.send_action(message.args[0][], "Hi!").unwrap();
server.send_privmsg(message.args[0][], "Hi!").unwrap();
}
}
}

View file

@ -185,6 +185,7 @@ mod test {
use_ssl: Some(false),
encoding: Some(format!("UTF-8")),
channels: Some(vec![format!("#test"), format!("#test2")]),
user_info: None,
options: Some(HashMap::new()),
};
assert_eq!(Config::load(Path::new("config.json")), Ok(cfg));
@ -205,6 +206,7 @@ mod test {
use_ssl: Some(false),
encoding: Some(format!("UTF-8")),
channels: Some(vec![format!("#test"), format!("#test2")]),
user_info: None,
options: Some(HashMap::new()),
};
assert_eq!(Config::load_utf8("config.json"), Ok(cfg));

View file

@ -449,20 +449,6 @@ mod test {
assert_eq!(levels.len(), exp.access_levels().len());
}
#[test]
#[cfg(feature = "ctcp")]
fn finger_response() {
let value = "test!test@test PRIVMSG test :\u{001}FINGER\u{001}\r\n";
let server = IrcServer::from_connection(test_config(), Connection::new(
MemReader::new(value.as_bytes().to_vec()), NullWriter
));
for message in server.iter() {
println!("{}", message);
}
assert_eq!(get_server_value(server)[], "NOTICE test :\u{001}FINGER :test (test)\u{001}\
\r\n");
}
#[test]
#[cfg(feature = "ctcp")]
fn finger_response() {

View file

@ -471,19 +471,6 @@ mod test {
"PRIVMSG test :\u{001}MESSAGE\u{001}\r\n");
}
#[test]
#[cfg(feature = "ctcp")]
fn send_ctcp() {
let server = IrcServer::from_connection(test_config(),
Connection::new(NullReader, MemWriter::new()));
{
let wrapper = Wrapper::new(&server);
wrapper.send_ctcp("test", "MESSAGE").unwrap();
}
assert_eq!(get_server_value(server)[],
"PRIVMSG test :\u{001}MESSAGE\u{001}\r\n");
}
#[test]
#[cfg(feature = "ctcp")]
fn send_action() {