3 TELNET_FAIL="telnet_fail"
4 PORT=`echo "$$+1024" | bc`
8 sleep 2 && ps $1 > /dev/null && touch $TELNET_FAIL && kill -9 $1
14 if [ `ls $TELNET_FAIL 2> /dev/null | wc -l` = 1 ]
21 # Remove the fail file if needed
24 # Test that VLC handle options correctly
25 ../vlc -I luatelnet --telnet-port $PORT &
29 echo "admin\nshutdown\n" | nc localhost $PORT
32 ../vlc -I luatelnet --telnet-port $PORT --telnet-password bla &
36 echo "bla\nshutdown\n" | nc localhost $PORT
39 ../vlc -I luatelnet --telnet-port $PORT --telnet-password one_long_password &
43 echo "one_long_password\nshutdown\n" | nc localhost $PORT
46 ../vlc -I luatelnet --telnet-port $PORT --telnet-password "" &
50 echo "\nshutdown\n" | nc localhost $PORT