Fixed build.
This commit is contained in:
parent
06cd54f39e
commit
b44ff8b196
4 changed files with 3 additions and 28 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue