mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 22:15:50 +00:00
fix(java): preserve Maven POM version spelling (#12714)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
This commit is contained in:
1 parent
bb8e6833eb
commit
e1218b0388
3 files changed
+41
-6
No files matched your search
@@ -449,6 +449,31 @@ it("applies XML end-of-line handling to POM text", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[" ", "\u00a0"],
|
||||
["", "\ufeff"],
|
||||
[" ", ""],
|
||||
])(
|
||||
"preserves declared POM version characters at a %s boundary",
|
||||
(reference, retained) => {
|
||||
const report = parse(`<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>example</groupId>
|
||||
<artifactId>demo</artifactId>
|
||||
<version> ${reference}1.0${reference} </version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>example</groupId>
|
||||
<artifactId>library</artifactId>
|
||||
<version> ${reference}2.0${reference} </version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>`);
|
||||
expect(report.coordinates.version).toBe(`${retained}1.0${retained}`);
|
||||
expect(report.dependencies[0]?.version).toBe(`${retained}2.0${retained}`);
|
||||
},
|
||||
);
|
||||
|
||||
it("lists properties in packaging, scope, type and classifier", () => {
|
||||
const report = parse(`<project>
|
||||
<groupId>com.example</groupId>
|
||||
|
||||
Reference in new issue
Block a user