irctk

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

commit adbcb7afe9b9433a9963c8435b2a4cf1ea8c9b0d
parent 393388206949860515f24e167e6e79e0ac414743
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri, 27 Jul 2012 21:27:43 +0200

added one order test which isolates a bug

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

diff --git a/test/order_1.sh b/test/order_1.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +trap 'kill $(jobs -p)' EXIT + +cat >tosay <<EOF +[#test2] a +[#test2] b +[#test1,#test2] c +EOF +cat > ref_message <<EOF +[#test2] <op2> a +[#test2] <op2> b +EOF + +(sleep 5; cat tosay) | + ../irctk op@localhost \#test1 \#test2 2>/dev/null > /dev/null& +sleep 1 +PID=$! +cat fifo1 | ../irctk message@localhost \#test1 \#test2 > heard_message & +PID1=$! +sleep 0.3 +wait $PID +sleep 1 +kill $PID1 + +diff ref_message <(head -2 heard_message) +