use of org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice in project tycho by eclipse.
the class FeatureRootAdviceLinksTest method testWhitespaceAroundSeparatorsInLinks.
@Test
public void testWhitespaceAroundSeparatorsInLinks() throws Exception {
Properties buildProperties = createBuildPropertiesWithDefaultRootFiles();
buildProperties.put("root.link", " file1.txt , alias1.txt , dir/file3.txt,alias2.txt , \n\tfile2.txt , alias3.txt \n\t");
IFeatureRootAdvice advice = createAdvice(buildProperties);
String actualLinks = advice.getDescriptor(GLOBAL_SPEC).getLinks();
assertEquals("file1.txt,alias1.txt,dir/file3.txt,alias2.txt,file2.txt,alias3.txt", actualLinks);
}
use of org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice in project tycho by eclipse.
the class FeatureRootAdviceLinksTest method testSpecificLinkButNoFiles.
@Test(expected = IllegalArgumentException.class)
public void testSpecificLinkButNoFiles() throws Exception {
Properties buildProperties = createBuildPropertiesWithDefaultRootFiles();
buildProperties.put("root." + WINDOWS_SPEC_FOR_PROPERTIES_KEY + ".link", "file1.txt,alias.txt");
IFeatureRootAdvice advice = createAdvice(buildProperties);
callGetDescriptorsForAllConfigurations(advice);
}
use of org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice in project tycho by eclipse.
the class FeatureRootAdviceLinksTest method testNoLinks.
@Test
public void testNoLinks() {
Properties buildProperties = createBuildPropertiesWithDefaultRootFiles();
IFeatureRootAdvice advice = createAdvice(buildProperties);
String globalLinks = advice.getDescriptor(GLOBAL_SPEC).getLinks();
assertEquals("", globalLinks);
}
use of org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice in project tycho by eclipse.
the class FeatureRootAdvicePermissionsTest method testSpecificPermissions.
@Test
public void testSpecificPermissions() {
Properties buildProperties = createBuildPropertiesWithDefaultRootFiles();
buildProperties.put("root.permissions.755", "file1.txt");
buildProperties.put("root." + LINUX_SPEC_FOR_PROPERTIES_KEY, "file:rootfiles/file2.txt");
buildProperties.put("root." + LINUX_SPEC_FOR_PROPERTIES_KEY + ".permissions.755", "file2.txt");
IFeatureRootAdvice advice = createAdvice(buildProperties);
List<String[]> globalPermissions = getSortedPermissions(advice, GLOBAL_SPEC);
assertEquals(1, globalPermissions.size());
List<String[]> specificPermissions = getSortedPermissions(advice, LINUX_SPEC_FOR_ADVICE);
assertEquals(1, specificPermissions.size());
}
use of org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice in project tycho by eclipse.
the class FeatureRootAdvicePermissionsTest method testGlobalPermissionsButNoFiles.
@Test(expected = IllegalArgumentException.class)
public void testGlobalPermissionsButNoFiles() throws Exception {
Properties buildProperties = createBuildPropertiesWithoutRootKeys();
buildProperties.put("root.permissions.644", "file2.txt");
IFeatureRootAdvice advice = createAdvice(buildProperties);
callGetDescriptorsForAllConfigurations(advice);
}
Aggregations