Skip to content

Canonicalization tests - N-triples and N-Quads --> fails - most likely it only fails on windows #3845

@arne-bdt

Description

@arne-bdt

Version

6.1.0-SNAPSHOT

What happened?

Revision: 7810feb
org.apache.jena.riot.Scripts_C14N does not successfully run unter windows.

**** Test: C14N comment_following_triple
---- Input
<http://example/s> <http://example/p> <http://example/o> .
---- Actual
<http://example/s> <http://example/p> <http://example/o> .
---- Expected
<http://example/s> <http://example/p> <http://example/o> .
--------

org.opentest4j.AssertionFailedError: Does not match expected canonical text ==> 
Expected :true
Actual   :false

The debugger reveals that actual ends with \n, where expected end with \r\n:
Image

In org.apache.jena.riot.writer.WriterStreamRDFPlain#triple and #quad the last line is:
out.print(" .\n");

Changing these two occurences to
out.print(" ." + System.lineSeparator());
fixes the tests.
But the code is that way since 09.03.2013 (DD.MM.YYYY), so I am pretty sure this would not be the desired solution.

Which would be the desired solution?

Relevant output and stacktrace

Are you interested in making a pull request?

Maybe

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions