irctk

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

commit ced35a2d265d0b6d8b1f3ff44ec263e6333cb850
parent 39409d162f1593468b6c23df514326cc809d6926
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri, 27 Jul 2012 22:25:42 +0200

add missing test

Diffstat:
test/sync.sh | 30++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/test/sync.sh b/test/sync.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +trap 'kill $(jobs -p)' EXIT + +cat >tosay <<EOF +/join #test2 +[#test1] /nick op2 +/mode +n +/mode -n +/part +[#test1,#test2] /topic mytopic +[#test2] /invite command +[#test2] /kick command kickarg +/say hello +/ /hello2 +/quit quitarg +EOF +(sleep 3; cat tosay) | ../irctk -p op@localhost \#test1 \#test2 2>/dev/null & +sleep 1 +PID=$! +cat fifo1 | ../irctk -m message@localhost \#test1 \#test2 > heard_message & +PID1=$! +cat fifo2 | ../irctk -c command@localhost \#test1 \#test2 > heard_command & +PID2=$! +cat fifo3 | ../irctk -n nothing@localhost \#test1 \#test2 > heard_nothing & +PID3=$! +wait $PID +sleep 1 +kill $PID1 $PID2 $PID3 +