diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0307b80..eed803c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ # -# Copyright 2016-2021 Red Hat, Inc. and/or its affiliates +# Copyright 2016-2023 Red Hat, Inc. and/or its affiliates # and other contributors as indicated by the @author tags. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest ] + os: [ubuntu-latest, windows-latest ] java: ['11'] steps: diff --git a/core/src/test/java/org/jboss/galleon/featurepack/xml/test/FeaturePackXml30ParserTestCase.java b/core/src/test/java/org/jboss/galleon/featurepack/xml/test/FeaturePackXml30ParserTestCase.java index 9d38e23a..abdeab98 100644 --- a/core/src/test/java/org/jboss/galleon/featurepack/xml/test/FeaturePackXml30ParserTestCase.java +++ b/core/src/test/java/org/jboss/galleon/featurepack/xml/test/FeaturePackXml30ParserTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2022 Red Hat, Inc. and/or its affiliates + * Copyright 2016-2023 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,6 +21,7 @@ import org.jboss.galleon.spec.FeaturePackSpec; import org.jboss.galleon.test.util.XmlParserValidator; +import org.jboss.galleon.util.PropertyUtils; import org.jboss.galleon.xml.FeaturePackXmlParser; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -47,7 +48,11 @@ public static void resetLocale() { @Test public void readAbsoluteSystemPath() throws Exception { - validator.validateAndParse("xml/feature-pack/feature-pack-3.0-absolute-system-path.xml", + String path = "xml/feature-pack/feature-pack-3.0-absolute-system-path.xml"; + if (PropertyUtils.isWindows()) { + path = "xml/feature-pack/feature-pack-3.0-absolute-system-path-win.xml"; + } + validator.validateAndParse(path, null, "The content of 'system-path' element should be a path relative to installation base."); } diff --git a/core/src/test/resources/xml/feature-pack/feature-pack-3.0-absolute-system-path-win.xml b/core/src/test/resources/xml/feature-pack/feature-pack-3.0-absolute-system-path-win.xml new file mode 100644 index 00000000..11307a55 --- /dev/null +++ b/core/src/test/resources/xml/feature-pack/feature-pack-3.0-absolute-system-path-win.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file