Added travis.yml file, added simple test for modlists

This commit is contained in:
majormjr 2016-05-08 09:09:26 -04:00
parent 8535bf59f6
commit ed71358a17
2 changed files with 29 additions and 0 deletions

9
.travis.yml Normal file
View File

@ -0,0 +1,9 @@
language: go
go:
- 1.4.3
- 1.5.4
- release
- tip
script:
- go test -v ./...

20
mods_test.go Normal file
View File

@ -0,0 +1,20 @@
package main
import (
"fmt"
"testing"
)
var (
modDir = "/home/mitch/bin/factorio/mods"
)
func TestListInstalledMods(t *testing.T) {
result, err := listInstalledMods(modDir)
if err != nil {
t.Errorf("Error listing mods test: %s", err)
}
if len(result) < 1 {
fmt.Println("No Mods installed")
}
}