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

Regression tests to highlight #242 #243

Closed
wants to merge 1 commit into from

Conversation

tomascohen
Copy link

@jhthorsen I'm not entirely sure about this regression tests, but they highlight some weird behavior. Particularly, the first one is adding extra spaces in suspicious ways. And the second call is stripping the trailing occurences of the header.

Count on me if I can be of help.

To reproduce:
1. Apply this patch
2. Run:
   $ PERL5LIB=../json-validator/lib/:../mojo/lib:./lib prove t/v2-headers.t
=> FAIL: Tests fail! Weird header handling!

 #   Failed test 'exact match for JSON Pointer "/first"'
 #   at t/v2-headers.t line 50.
 #          got: '42, 24,  44'
 #     expected: '42,24, 44'

 #   Failed test 'exact match for JSON Pointer "/second"'
 #   at t/v2-headers.t line 50.
 #          got: '42'
 #     expected: '42,24, 44'
 # Looks like you failed 2 tests of 32.

The 'first' use case, might be correct, meaning some sanitization of the
collection format takes place. But the fact that the space is added even
on the case that already had one, is suspicious.

The second failure confirms that repeated headers are mangled in a way
they get lost.
jhthorsen added a commit that referenced this pull request Feb 26, 2023
@jhthorsen jhthorsen self-assigned this Feb 26, 2023
@jhthorsen
Copy link
Owner

@jhthorsen jhthorsen closed this Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants