commit 90c055cfaa22673f1bfbc035f64af76c0be5e898 parent 6b066bd8c1bdbf70f1b1d0bcac235e20691c6548 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Fri, 10 Aug 2012 00:56:16 +0200 add test for -t Diffstat:
test/track.sh | | | 38 | ++++++++++++++++++++++++++++++++++++++ |
1 file changed, 38 insertions(+), 0 deletions(-)
diff --git a/test/track.sh b/test/track.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +trap "kill 0" SIGINT SIGTERM EXIT + +mkdir -p track +cd track +mkfifo fifo 2>/dev/null + +(cat fifo | while read l; do seq 3 | sed -u "s/^/$l/"; done | ../../irctk -Frt trackr@localhost \#track_test >fifo) & +PID=$! +sleep 1 +cat > say <<EOF +trackr: a +/nick trackb +blah +bleh +blouh +trackr: b +/nick trackc +bleuh +blih +bloh +trackr: c +/nick trackd +grih +groh +EOF +cat say | ../../irctk -I5 -F tracka@localhost \#track_test >heard +sleep 2 +kill $PID + +for l in a b c +do + seq 3 | sed -u "s/^/$l/" > ref$l +done + +diff <(cut -d' ' -f4- heard) <(cat refa refb refc) +