Skip to content

Commit

Permalink
Merge pull request #60 from xhit/xhit-patch-1
Browse files Browse the repository at this point in the history
Make test happy on Windows
  • Loading branch information
tiaguinho authored Jun 17, 2020
2 parents b812d0c + 02a2bdb commit d44b69f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions wsdl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package gosoap
import (
"fmt"
"os"
"runtime"
"strings"
"testing"
)

Expand All @@ -11,6 +13,13 @@ func Test_getWsdlBody(t *testing.T) {
u string
}
dir, _ := os.Getwd()

// in windows, os.Getwd() returns backslash (\) instead slash (/) for path separator
// replacing the backslash for slash make the test happy on Windows
if runtime.GOOS == "windows" {
dir = strings.ReplaceAll(dir, `\`, "/")
}

tests := []struct {
name string
args args
Expand Down

0 comments on commit d44b69f

Please sign in to comment.