This repository has been archived on 2021-04-17. You can view files and clone it, but cannot push or open issues or pull requests.
uIRC/tests/notrail.c

22 lines
444 B
C

#include "../include/uirc.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
int main(void)
{
char mesg[513] =
":nick!user@host QUIT arg1 ";
IRC_Message parseout = {0};
int res = 0;
if ((res = Tok_mesg(mesg, &parseout)) <= 0) {
printf("String could not be tokenized. %i\n", res);
return EXIT_FAILURE;
}
if (parseout.trailing) {
printf("Got unexpected trailing.");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}