GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MSHARED-952] make PrettyPrintXmlWriter platform independent by elharo · Pull Request #62 · apache/maven-shared-utils

Conversation

@elharo

@elharo elharo commented Aug 14, 2020

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@elharo
make test platform independent
9419d4c
@michael-o

michael-o commented Aug 14, 2020

Copy link
Copy Markdown
Member

Isn't the test portable already when the proper line separator is used throughout?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elharo

elharo commented Aug 14, 2020

Copy link
Copy Markdown
Contributor Author

It passes on all platforms ATM but it's not testing the same thing on all platforms. E.g. if we had a bug in handling \r\n then the bug wouldn't be seen when running on Linux or the Mac. Or if we had a bug handing \n it wouldn't be found on Windows.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@michael-o

michael-o commented Aug 14, 2020

Copy link
Copy Markdown
Member

But the purpose of the test is to test the tags and not the line separators? You have removed unifyLineSeparators() which makes it better.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elharo

elharo commented Aug 14, 2020

Copy link
Copy Markdown
Contributor Author

The general contract of a unit test is running a function with known, fixed input and comparing it to known fixed output. unifyLineSeparators() means the input and output to which its applied are no longer fixed. They're platform dependent. While we do occasionally need tests for specific issues that crop up on this or that platform, there's no need for it here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@michael-o

michael-o commented Aug 14, 2020

Copy link
Copy Markdown
Member

Agreed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

elharo added 3 commits August 15, 2020 07:39
@elharo
Merge branch 'master' into i952
a9c6e35
@elharo
remove broken links
7e95b52
@elharo
fix skipped test
e4b194a
@elharo

elharo commented Aug 15, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Fixing this has revealed some more platform dependent code in our output code which interferes with reproducible builds.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elharo
make PrettyPrintXmlWriter platform independent
7deddfc
@elharo elharo changed the title [MSHARED-952] make test platform independent [MSHARED-952] make PrettyPrinXmlWriter platform independent Aug 16, 2020
@elharo elharo changed the title [MSHARED-952] make PrettyPrinXmlWriter platform independent [MSHARED-952] make PrettyPrintXmlWriter platform independent Aug 16, 2020
@elharo
make test platform independent
a05b865
@elharo
elharo merged commit 6852024 into master Aug 24, 2020
@elharo
elharo deleted the i952 branch August 24, 2020 12:11
@jira-importer

jira-importer commented Jul 3, 2025

Copy link
Copy Markdown

Resolve #273

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jira-importer jira-importer mentioned this pull request Sep 11, 2026
[MSHARED-952] PrettyPrintXmlWriter output is platform dependent #273
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@elharo @michael-o @jira-importer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.