This is an automated email from the ASF dual-hosted git repository. skygo pushed a commit to branch layertestpatch in repository https://gitbox.apache.org/repos/asf/netbeans.git
commit 39924ada96e76c6c9cf457d38c4d4d828f6cefe3 Author: Eric Barboni <[email protected]> AuthorDate: Fri Oct 1 17:12:36 2021 +0200 update test for layerbuilder on jenkins nodes layer generation is "wrong" and we have a 1 line xml declaration for xml and doctype, clean method is not able to take this <?xml version='1.0' encoding='UTF-8'?><!DOCTYPE filesystem PUBLIC '-//NetBeans//DTD Filesystem 1.2//EN' 'http://www.netbeans.org/dtds/filesystem-1_2.dtd'> trying to change replacefirst so that it only remove what is inside <> --- .../src/org/openide/filesystems/annotations/LayerBuilderTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/openide.filesystems/test/unit/src/org/openide/filesystems/annotations/LayerBuilderTest.java b/platform/openide.filesystems/test/unit/src/org/openide/filesystems/annotations/LayerBuilderTest.java index 3da6a82..6e4ff5c 100644 --- a/platform/openide.filesystems/test/unit/src/org/openide/filesystems/annotations/LayerBuilderTest.java +++ b/platform/openide.filesystems/test/unit/src/org/openide/filesystems/annotations/LayerBuilderTest.java @@ -81,8 +81,9 @@ public class LayerBuilderTest extends NbTestCase { private static String clean(String layer) { return layer. replace('"', '\''). - replaceFirst("^<\\?xml version='1\\.0' encoding='UTF-8'\\?>\r?\n", ""). - replaceFirst("^<!DOCTYPE [^>]+>\r?\n", ""). + // can be on same line try to remove only the element + replaceFirst("<\\?xml version='1\\.0' encoding='UTF-8'\\?>", ""). + replaceFirst("<!DOCTYPE [^>]+>", ""). replaceAll("\r?\n *", ""); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
