Skip to content

Unit test in EvalTagTests fails with French as default locale [SPR-11392] #16019

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

Closed
spring-projects-issues opened this issue Feb 5, 2014 · 5 comments
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Sébastien Deleuze opened SPR-11392 and commented

The testPrintFormattedScopedAttributeResult() test method from org.springframework.web.servlet.tags.EvalTagTests is locale dependent.

When I built Spring from sources with French locale, this test failed. When I switched to English locale, it passed.

The current assertion is hard coded ("25%"). I think it should take into account the default locale in order to have the test pass regardless of the default locale of the computer running the tests. In my case it is "25%" with English locale and "25 %" with French locale.


Affects: 3.2.7, 4.0.1

Backported to: 3.2.8

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Hi Sébastien,

I've merged this into master: edb0b0e

Though I'm not sure if it warrants a backport to 3.2.x. So I'll leave this issue open until you clarify that.

Regards,

Sam

@spring-projects-issues
Copy link
Collaborator Author

Sébastien Deleuze commented

Thanks for merging Sam. We should backport this to 3.2.x too, I double checked with Juergen Hoeller.

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

OK. I'll take care of the backport.

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

This has now been backported to 3.2.x: a2ec8f8

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Resolving this issue as complete since it has been pushed to both the master (4.0.2) and 3.2.x (3.2.8) branches. See previous comments for links and further details.

@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches type: task A general task labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0.2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants