File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ func (g *GoWsdl) unmarshal() error {
143143
144144 parsedUrl , err := url .Parse (g .file )
145145 if parsedUrl .Scheme == "" {
146- log .Println ("Reading" , "file" , g .file )
146+ // log.Println("Reading", "file", g.file)
147147
148148 data , err = ioutil .ReadFile (g .file )
149149 if err != nil {
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ package gowsdl
33import (
44 "testing"
55 "strings"
6+ "go/format"
7+ "bytes"
8+ "path/filepath"
69)
710
811func TestElementGenerationDoesntCommentOutStructProperty (t * testing.T ) {
@@ -21,3 +24,34 @@ func TestElementGenerationDoesntCommentOutStructProperty(t *testing.T) {
2124 t .Error (string (resp ["types" ]))
2225 }
2326}
27+
28+ func TestVboxGeneratesWithoutSyntaxErrors (t * testing.T ) {
29+ files , err := filepath .Glob ("fixtures/*.wsdl" )
30+ if err != nil {
31+ t .Error (err )
32+ }
33+
34+ for _ ,file := range files {
35+ g := GoWsdl {
36+ file : file ,
37+ pkg : "myservice" ,
38+ }
39+
40+ resp ,err := g .Start ()
41+ if err != nil {
42+ continue
43+ //t.Error(err)
44+ }
45+
46+ data := new (bytes.Buffer )
47+ data .Write (resp ["header" ])
48+ data .Write (resp ["types" ])
49+ data .Write (resp ["operations" ])
50+ data .Write (resp ["soap" ])
51+
52+ _ , err = format .Source (data .Bytes ())
53+ if err != nil {
54+ t .Error (err )
55+ }
56+ }
57+ }
You can’t perform that action at this time.
0 commit comments