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

Fix reversed Got/Expected in expectFileContent in docs_test.go #1320

Conversation

anthonyfok
Copy link
Contributor

@anthonyfok anthonyfok commented Jan 3, 2022

What type of PR is this?

  • bug
  • cleanup
  • documentation
  • feature

What this PR does / why we need it:

To fix reversed Got/Expected in expectFileContent (in docs_test.go).
The bug confused me (as a developer) when bumping github.com/cpuguy83/go-md2man/v2 to v2.0.1 (see PR #1321) and noticed go-md2man generated output ended up in "Expected".

Which issue(s) this PR fixes:

None

Testing

I edited testdata/expected-doc-full.man and noticed my change ended up in "Got" instead of "Expected".

I then changed some test cases in app_test.go and convinced myself expect() is OK (Expected/Got not reversed), and eventually confirmed that the bug is in expectFileContent() in docs_test.go.

Finally, after applying this fix, I confirmed that my local change to testdata/expected-doc-full.man would indeed end up in the "Expected" section of TestToMan and TestToManWithSection output.

Release Notes

NONE

@anthonyfok anthonyfok requested a review from a team as a code owner January 3, 2022 03:07
@anthonyfok anthonyfok force-pushed the fix-reversed-got-expected-in-expectFileContent branch from 499e1d7 to 217b8f3 Compare January 3, 2022 04:10
@rliebz rliebz merged commit a7d5984 into urfave:master Jan 3, 2022
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.

None yet

2 participants