lua test: move the tests from modules/misc/lua to modules/lua
authorRémi Duraffort <ivoire@videolan.org>
Tue, 12 Jul 2011 13:35:43 +0000 (15:35 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 13 Jul 2011 08:48:03 +0000 (10:48 +0200)
test/Makefile.am
test/modules/lua/telnet.sh [new file with mode: 0755]
test/modules/misc/lua/telnet.sh [deleted file]

index a76bdef..17f82b0 100644 (file)
@@ -22,7 +22,7 @@ check_PROGRAMS = \
         $(NULL)
 
 check_SCRIPTS = \
-    modules/misc/lua/telnet.sh
+    modules/lua/telnet.sh
 
 # Disabled test:
 # meta: No suitable test file
diff --git a/test/modules/lua/telnet.sh b/test/modules/lua/telnet.sh
new file mode 100755 (executable)
index 0000000..5716bf6
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+TELNET_FAIL="telnet_fail"
+PORT=`echo "$$+1024" | bc`
+
+killer()
+{
+  sleep 2 && ps $1 > /dev/null && touch $TELNET_FAIL && kill -9 $1
+}
+
+wait_or_quit()
+{
+  wait $1
+  if [ `ls $TELNET_FAIL 2> /dev/null | wc -l` = 1 ]
+  then
+    rm -f $TELNET_FAIL
+    exit 1
+  fi
+}
+
+# Remove the fail file if needed
+rm -f $TELNET_FAIL
+
+# Test that VLC handle options correctly
+../vlc -I luatelnet --telnet-port $PORT &
+VLC1=$!
+sleep 1
+killer $VLC1 &
+echo "admin\nshutdown\n" | nc localhost $PORT
+wait_or_quit $VLC1
+
+../vlc -I luatelnet --telnet-port $PORT --telnet-password bla &
+VLC2=$!
+sleep 1
+killer $VLC2 &
+echo "bla\nshutdown\n" | nc localhost $PORT
+wait_or_quit $VLC2
+
+../vlc -I luatelnet --telnet-port $PORT --telnet-password one_long_password &
+VLC3=$!
+sleep 1
+killer $VLC3 &
+echo "one_long_password\nshutdown\n" | nc localhost $PORT
+wait_or_quit $VLC3
+
+../vlc -I luatelnet --telnet-port $PORT --telnet-password "" &
+VLC4=$!
+sleep 1
+killer $VLC4 &
+echo "\nshutdown\n" | nc localhost $PORT
+wait_or_quit $VLC4
+
+exit 0
diff --git a/test/modules/misc/lua/telnet.sh b/test/modules/misc/lua/telnet.sh
deleted file mode 100755 (executable)
index 5716bf6..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-TELNET_FAIL="telnet_fail"
-PORT=`echo "$$+1024" | bc`
-
-killer()
-{
-  sleep 2 && ps $1 > /dev/null && touch $TELNET_FAIL && kill -9 $1
-}
-
-wait_or_quit()
-{
-  wait $1
-  if [ `ls $TELNET_FAIL 2> /dev/null | wc -l` = 1 ]
-  then
-    rm -f $TELNET_FAIL
-    exit 1
-  fi
-}
-
-# Remove the fail file if needed
-rm -f $TELNET_FAIL
-
-# Test that VLC handle options correctly
-../vlc -I luatelnet --telnet-port $PORT &
-VLC1=$!
-sleep 1
-killer $VLC1 &
-echo "admin\nshutdown\n" | nc localhost $PORT
-wait_or_quit $VLC1
-
-../vlc -I luatelnet --telnet-port $PORT --telnet-password bla &
-VLC2=$!
-sleep 1
-killer $VLC2 &
-echo "bla\nshutdown\n" | nc localhost $PORT
-wait_or_quit $VLC2
-
-../vlc -I luatelnet --telnet-port $PORT --telnet-password one_long_password &
-VLC3=$!
-sleep 1
-killer $VLC3 &
-echo "one_long_password\nshutdown\n" | nc localhost $PORT
-wait_or_quit $VLC3
-
-../vlc -I luatelnet --telnet-port $PORT --telnet-password "" &
-VLC4=$!
-sleep 1
-killer $VLC4 &
-echo "\nshutdown\n" | nc localhost $PORT
-wait_or_quit $VLC4
-
-exit 0