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

15 lines
478 B
C++
Raw Normal View History

2016-10-18 17:17:40 +05:00
#include <cassert>
#include <iostream>
2017-10-17 19:29:56 +05:00
#include <nntpchan/exec_frontend.hpp>
#include <nntpchan/sanitize.hpp>
2016-10-18 17:17:40 +05:00
2018-05-06 19:21:58 +05:00
int main(int, char *[], char * argenv[])
2016-10-18 17:17:40 +05:00
{
2018-05-06 19:21:58 +05:00
nntpchan::Frontend_ptr f(new nntpchan::ExecFrontend("./contrib/nntpchan.sh", argenv));
2016-10-18 17:17:40 +05:00
assert(f->AcceptsMessage("<test@server>"));
assert(f->AcceptsNewsgroup("overchan.test"));
assert(nntpchan::IsValidMessageID("<test@test>"));
assert(!nntpchan::IsValidMessageID("asd"));
2016-10-18 17:17:40 +05:00
std::cout << "all good" << std::endl;
}