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 InternalProvisionExceptionTest, which was failing on Windows due to a newline assumption #1213

Closed
wants to merge 1 commit into from
Closed

Conversation

chrisparton1991
Copy link
Contributor

InternalProvisionException uses the %n string format, which returns a platform-specific newline code. InternalProvisionExceptionTest, however, assumes a \n, and therefore fails on Windows.

I've updated the unit test to use System.lineSeparator() so the test will pass on any platform.

copybara-service bot pushed a commit that referenced this pull request Apr 19, 2023
…e system line separator and always using \n explicitly. (We were previously inconsistent: many places used \n, and many other places used %n with a formatter, which would end up being the system line separator.) This allows tests to pass on Windows, where the line separator is different. Also update tests to do a run with the windows line separator, to catch regressions. Fixes #1213.

PiperOrigin-RevId: 525552063
copybara-service bot pushed a commit that referenced this pull request Apr 19, 2023
…e system line separator and always using \n explicitly. (We were previously inconsistent: many places used \n, and many other places used %n with a formatter, which would end up being the system line separator.) This allows tests to pass on Windows, where the line separator is different. Also update tests to do a run with the windows line separator, to catch regressions. Fixes #1213.

PiperOrigin-RevId: 525552063
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.

3 participants