From e4534caa821ef18b8413afee06b22aecd7407620 Mon Sep 17 00:00:00 2001 From: Max Claus Nunes Date: Fri, 22 Jun 2018 22:00:23 -0300 Subject: [PATCH] Fix appveyor setting --- appveyor.yml | 4 ++-- watcher_test.go | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 14ad5f2..b37702c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/watcher_test.go b/watcher_test.go index 13b49bc..41a03bc 100644 --- a/watcher_test.go +++ b/watcher_test.go @@ -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) }