Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for MatchXML #209

Merged
merged 1 commit into from
Apr 30, 2017
Merged

Conversation

aubm
Copy link
Contributor

@aubm aubm commented Apr 29, 2017

Actual and expected can not be pretty printed in the test output because
there are issues in the encoding/xml package related to deplicated
namespaces. See golang/go#7535

Because Go has no support for collecting all XML attributes before 1.8
(see here), the two following XMLs will be equal for 1.7 and before:

<person gender="female">
<person gender="male">

@aubm aubm force-pushed the adds-support-for-match-xml branch 3 times, most recently from 8287255 to cd318f7 Compare April 29, 2017 15:43
@onsi
Copy link
Owner

onsi commented Apr 29, 2017

Sweet! Unfortunately it looks like this broke 1.6 and 1.7 on Travis. Any chance you could take a look?

@aubm
Copy link
Contributor Author

aubm commented Apr 29, 2017

Yes I'm trying to figure it out.
I'm running out of time right now but I will come back to it later :)

@onsi
Copy link
Owner

onsi commented Apr 29, 2017

👍

@aubm
Copy link
Contributor Author

aubm commented Apr 29, 2017

It seems that this particular struct field tag xml:",any,attr" was not supported before 1.8. See golang/go@c1a1328

I will have to search for another approach, too bad...

@aubm
Copy link
Contributor Author

aubm commented Apr 29, 2017

Possibly there could be specific code for <1.8, minus the support for attributes checking.
It is not super clean... what is your opinion on this?

(I did not look for other solutions yet).

@onsi
Copy link
Owner

onsi commented Apr 29, 2017 via email

@aubm aubm changed the title Adds support for MatchXML WIP: Adds support for MatchXML Apr 30, 2017
@aubm aubm force-pushed the adds-support-for-match-xml branch 2 times, most recently from a6b7b3d to e2125a3 Compare April 30, 2017 14:51
@aubm aubm changed the title WIP: Adds support for MatchXML Adds support for MatchXML Apr 30, 2017
Actual and expected can not be pretty printed in the test output because
there are issues in the encoding/xml package related to deplicated
namespaces. See golang/go#7535

Because Go has no support for collecting all XML attributes before 1.8
(see [here](golang/go@c1a1328)),
the two following XMLs will be equal for 1.7 and before:

```
<person gender="female">
```

```
<person gender="male">
```
@aubm aubm force-pushed the adds-support-for-match-xml branch from e2125a3 to a93bfc7 Compare April 30, 2017 14:56
@aubm
Copy link
Contributor Author

aubm commented Apr 30, 2017

It should be ok now.

@onsi
Copy link
Owner

onsi commented Apr 30, 2017

Ok thanks. Can you submit a PR for the gh-pages docs as well?

@aubm
Copy link
Contributor Author

aubm commented Apr 30, 2017

Done: #210

@onsi onsi merged commit da36735 into onsi:master Apr 30, 2017
@onsi
Copy link
Owner

onsi commented Apr 30, 2017

Sweet thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants