irctk

libircclient binding for scripts
git clone https://a3nm.net/git/irctk/
Log | Files | Refs | README

commit 0218175abb3dcfc364e30db1fecf879d115435af
parent 8b033c3ffe4ac79c36346127fca599170b460a5e
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 28 Jul 2012 00:16:06 +0200

get rid of testing code, we have real tests now

Diffstat:
irctk.c | 48------------------------------------------------
1 file changed, 0 insertions(+), 48 deletions(-)

diff --git a/irctk.c b/irctk.c @@ -1762,54 +1762,6 @@ int start (int max_wait) return 0; } -int test_fifo_set() { - int n_results; - action *results; - int cont = 1; - int i; - char msga1[100]; - char msga2[100]; - char msga3[100]; - char msgb1[100]; - char msgc13[100]; - strcpy(msga1, "round A1 message"); - strcpy(msga2, "round A2 message"); - strcpy(msga3, "round A3 message"); - strcpy(msgb1, "round B1 message"); - strcpy(msgc13, "round C13 message"); - char chan1[100]; - char chan2[100]; - char chan3[100]; - char chan13[100]; - strcpy(chan1, "chan1"); - strcpy(chan2, "chan2"); - strcpy(chan3, "chan3"); - strcpy(chan13, "chan1,chan3"); - - push_fifo_set(&fifos, NULL, chan1, msga1); - push_fifo_set(&fifos, NULL, chan2, msga2); - push_fifo_set(&fifos, NULL, chan3, msga3); - push_fifo_set(&fifos, NULL, chan1, msgb1); - push_fifo_set(&fifos, NULL, chan13, msgc13); - push_fifo_set(&fifos, NULL, "", NULL); - - while (cont) { - n_results = pop_fifo_set(&fifos, &results); - printf("got %d results\n", n_results); - if (!n_results) - break; - for (i=0; i<n_results; i++) { - if (!results[i].line) { - cont = 0; - printf("read sentinel\n"); - } else { - printf("read: %s\n", results[i].line); - } - } - } - printf("finished\n"); - return 0; -} int main (int argc, char **argv) {