mirror of https://github.com/maxcnunes/gaper.git
Fix appveyor setting
This commit is contained in:
parent
b45a8e94fe
commit
e4534caa82
|
@ -2,7 +2,7 @@ version: "{build}"
|
||||||
|
|
||||||
# Source Config
|
# Source Config
|
||||||
|
|
||||||
clone_folder: c:\gopath\src\github.com\golang\gaper
|
clone_folder: c:\gopath\src\github.com\maxcnunes\gaper
|
||||||
|
|
||||||
# Build host
|
# Build host
|
||||||
|
|
||||||
|
@ -27,5 +27,5 @@ build: false
|
||||||
deploy: false
|
deploy: false
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- go build github.com/golang/gaper
|
- go build github.com/maxcnunes/gaper/cmd/gaper
|
||||||
- make test
|
- make test
|
||||||
|
|
|
@ -3,6 +3,7 @@ package gaper
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -17,9 +18,14 @@ func TestWatcherDefaultValues(t *testing.T) {
|
||||||
|
|
||||||
w, err := NewWatcher(pollInterval, watchItems, ignoreItems, extensions)
|
w, err := NewWatcher(pollInterval, watchItems, ignoreItems, extensions)
|
||||||
|
|
||||||
|
expectedPath := "testdata/server"
|
||||||
|
if runtime.GOOS == OSWindows {
|
||||||
|
expectedPath = "testdata\\server"
|
||||||
|
}
|
||||||
|
|
||||||
assert.Nil(t, err, "wacher error")
|
assert.Nil(t, err, "wacher error")
|
||||||
assert.Equal(t, 500, w.PollInterval)
|
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.Len(t, w.IgnoreItems, 0)
|
||||||
assert.Equal(t, map[string]bool{".go": true}, w.AllowedExtensions)
|
assert.Equal(t, map[string]bool{".go": true}, w.AllowedExtensions)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue