irctk

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

fnick.sh (349B)


      1 #!/bin/bash
      2 
      3 trap 'kill $(jobs -p)' EXIT
      4 
      5 mkdir -p fnick
      6 cd fnick
      7 
      8 seq 3 | sed 's/^/[#fnick_test] <fnicko> /' > ref
      9 tail -f /dev/null | ../../irctk fnicki@localhost \#fnick_test > heard &
     10 PID=$!
     11 sleep 1
     12 if ../../irctk -N fnicki@localhost \#fnick_test 2>error >/dev/null
     13 then
     14   echo fail
     15   exit 1
     16 fi
     17 sleep 1
     18 kill $PID
     19 grep "in use" error > /dev/null