This repository has been archived on 2023-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2016-10-18 08:17:40 -04:00
|
|
|
#include <cassert>
|
|
|
|
|
#include <iostream>
|
2017-10-17 10:29:56 -04:00
|
|
|
#include <nntpchan/exec_frontend.hpp>
|
|
|
|
|
#include <nntpchan/sanitize.hpp>
|
2016-10-18 08:17:40 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
int main(int, char *[])
|
2016-10-18 08:17:40 -04:00
|
|
|
{
|
2017-10-17 10:29:56 -04:00
|
|
|
nntpchan::Frontend_ptr f(new nntpchan::ExecFrontend("./contrib/nntpchan.sh"));
|
2016-10-18 08:17:40 -04:00
|
|
|
assert(f->AcceptsMessage("<test@server>"));
|
|
|
|
|
assert(f->AcceptsNewsgroup("overchan.test"));
|
2017-10-09 11:48:10 -04:00
|
|
|
assert(nntpchan::IsValidMessageID("<test@test>"));
|
|
|
|
|
assert(!nntpchan::IsValidMessageID("asd"));
|
2016-10-18 08:17:40 -04:00
|
|
|
std::cout << "all good" << std::endl;
|
|
|
|
|
}
|