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/tagassm.c

22 lines
597 B
C

#include "../include/uirc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char mesg[513] = {0};
IRC_Tags input = {.time = {.value = "now", .clientbound = true}, .msgid = {.value = "", .clientbound = false}};
signed long res = 0;
if ((res = Assm_tags(mesg, &input, 512)) <= 0) {
printf("String could not be assembled. %li\n", res);
return EXIT_FAILURE;
}
if (strcmp(mesg, "@+time=now;msgid") != 0 && strcmp(mesg, "@msgid;+time=now") != 0) {
printf("String was not assembled properly. Have %s\n", mesg);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}