1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-11-03 04:27:17 -05:00

Add super basic runtime tests to travis

This commit is contained in:
fosslinux 2020-02-05 19:50:38 +11:00
parent c17e718794
commit 4340e3c55b
No known key found for this signature in database
GPG Key ID: 7D7996D0C25B63A3
5 changed files with 36 additions and 0 deletions

5
.gitignore vendored
View File

@ -10,6 +10,11 @@ README.options
bin2c
gophernicus
#
# Test leftovers
#
test.output
#
# Release files
#

View File

@ -17,3 +17,4 @@ compiler:
script:
- make
- sudo make install
- .travis/test.sh

15
.travis/test.answer Normal file
View File

@ -0,0 +1,15 @@
iWelcome to Gophernicus! TITLE null.host 1
i _______ __ __ null.host 1
i| __|.-----.-----.| |--.-----.----.-----.|__|.----.--.--.----- null.host 1
i| | || _ | _ || | -__| _| || || __| | |__ -- null.host 1
i|_______||_____| __||__|__|_____|__| |__|__||__||____|_____|_____ null.host 1
i |__| null.host 1
iIf you can see this, it means that the installation of Gophernicus null.host 1
ion this system was successful. You may now add content to this null.host 1
idirectory and replace this page. null.host 1
i null.host 1
iGeneric information: null.host 1
i null.host 1
iServer configuration: null.host 1
i null.host 1
.

5
.travis/test.expect Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/expect
spawn "/usr/bin/gophernicus"
sleep 0.05
expect ""
send "\n"

10
.travis/test.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
echo -e "\n" | gophernicus -nf -nu -nv -nx -nf -nd > test.output
if ! cmp .travis/test.answer test.output ; then
exit 1
fi
if ! gophernicus -v | grep -q 'Gophernicus/3.1 "Dungeon Edition"' ; then
exit 1
fi