Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/backends/nntpchan-daemon/test.cpp
2017-10-11 09:48:27 -04:00

17 lines
458 B
C++

#include <nntpchan/exec_frontend.hpp>
#include <nntpchan/sanitize.hpp>
#include <cassert>
#include <iostream>
int main(int , char * [])
{
nntpchan::Frontend_ptr f (new nntpchan::ExecFrontend("./contrib/nntpchan.sh"));
assert(f->AcceptsMessage("<test@server>"));
assert(f->AcceptsNewsgroup("overchan.test"));
assert(nntpchan::IsValidMessageID("<test@test>"));
assert(!nntpchan::IsValidMessageID("asd"));
std::cout << "all good" << std::endl;
}