Fix appveyor setting

This commit is contained in:
Max Claus Nunes 2018-06-22 22:00:23 -03:00
parent b45a8e94fe
commit e4534caa82
2 changed files with 9 additions and 3 deletions

View File

@ -2,7 +2,7 @@ version: "{build}"
# Source Config
clone_folder: c:\gopath\src\github.com\golang\gaper
clone_folder: c:\gopath\src\github.com\maxcnunes\gaper
# Build host
@ -27,5 +27,5 @@ build: false
deploy: false
test_script:
- go build github.com/golang/gaper
- go build github.com/maxcnunes/gaper/cmd/gaper
- make test

View File

@ -3,6 +3,7 @@ package gaper
import (
"os"
"path/filepath"
"runtime"
"testing"
"time"
@ -17,9 +18,14 @@ func TestWatcherDefaultValues(t *testing.T) {
w, err := NewWatcher(pollInterval, watchItems, ignoreItems, extensions)
expectedPath := "testdata/server"
if runtime.GOOS == OSWindows {
expectedPath = "testdata\\server"
}
assert.Nil(t, err, "wacher error")
assert.Equal(t, 500, w.PollInterval)
assert.Equal(t, map[string]bool{"testdata/server": true}, w.WatchItems)
assert.Equal(t, map[string]bool{expectedPath: true}, w.WatchItems)
assert.Len(t, w.IgnoreItems, 0)
assert.Equal(t, map[string]bool{".go": true}, w.AllowedExtensions)
}