summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-05-12 05:40:20 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-05-12 05:40:20 +0200
commita513a9a574014ad96dc6e854e3ffff6cf98fc29f (patch)
tree43c7e0a697d1980e972641b5ca1ea2de8ddda413 /test
parent5a0af0364f3eb5cb98f56493d9681afde3b1a0b1 (diff)
downloadxK-a513a9a574014ad96dc6e854e3ffff6cf98fc29f.tar.gz
xK-a513a9a574014ad96dc6e854e3ffff6cf98fc29f.tar.xz
xK-a513a9a574014ad96dc6e854e3ffff6cf98fc29f.zip
Travis CI: add a stupid end-to-end test
Diffstat (limited to 'test')
-rwxr-xr-xtest48
1 files changed, 48 insertions, 0 deletions
diff --git a/test b/test
new file mode 100755
index 0000000..38227aa
--- /dev/null
+++ b/test
@@ -0,0 +1,48 @@
+#!/usr/bin/expect -f
+# Very basic end-to-end testing for Travis CI
+
+# Run the daemon to test against
+system ./kike --write-default-cfg
+spawn ./kike -d
+
+# 10 seconds is a bit too much
+set timeout 5
+
+spawn ./degesch
+
+# Fuck this Tcl shit, I want the exit code
+expect_after {
+ eof {
+ puts ""
+ puts "Child exited prematurely"
+ exit 1
+ }
+}
+
+# Connect to the daemon
+send "/set server.irc_host = \"localhost\"\n"
+expect "Option changed"
+send "/disconnect\n"
+expect "]"
+send "/connect\n"
+expect "Connection established"
+
+# Try some chatting
+send "/join #test\n"
+expect "has joined"
+send "Hello\n"
+expect "Hello"
+
+# Attributes
+send "\x1bmbBold text! \x1bmc0,5And colors.\n"
+expect "]"
+
+# Try basic commands
+send "/set\n"
+expect "]"
+send "/help\n"
+expect "]"
+
+# Quit
+send "/quit\n"
+expect "Shutting down"