comparison tests/plugin-logger/main.cpp @ 454:8b615d37d303 release-2.1

Fix #642: plugins must be case sensitive
author David Demelier <markand@malikania.fr>
date Tue, 25 Jul 2017 17:08:19 +0200
parents c6fbb6e0e06d
children 0b156b82b8c1
comparison
equal deleted inserted replaced
447:108e63b449eb 454:8b615d37d303
180 m_plugin->onTopic(m_irccd, TopicEvent{m_server, "jean!jean@localhost", "#staff", "oh yeah yeaaaaaaaah"}); 180 m_plugin->onTopic(m_irccd, TopicEvent{m_server, "jean!jean@localhost", "#staff", "oh yeah yeaaaaaaaah"});
181 181
182 ASSERT_EQ("topic=test:#staff:jean!jean@localhost:jean:oh yeah yeaaaaaaaah\n", last()); 182 ASSERT_EQ("topic=test:#staff:jean!jean@localhost:jean:oh yeah yeaaaaaaaah\n", last());
183 } 183 }
184 184
185 TEST_F(LoggerTest, case_fix_642)
186 {
187 load();
188
189 m_plugin->onMessage(m_irccd, MessageEvent{m_server, "jean!jean@localhost", "#STAFF", "hello guys"});
190
191 ASSERT_EQ("message=test:#staff:jean!jean@localhost:jean:hello guys\n", last());
192 }
193
185 int main(int argc, char **argv) 194 int main(int argc, char **argv)
186 { 195 {
187 path::setApplicationPath(argv[0]); 196 path::setApplicationPath(argv[0]);
188 testing::InitGoogleTest(&argc, argv); 197 testing::InitGoogleTest(&argc, argv);
189 log::setLogger(std::make_unique<log::SilentLogger>()); 198 log::setLogger(std::make_unique<log::SilentLogger>());