Skip to content

Commit

Permalink
Add testcase for #2706
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Aug 15, 2023
1 parent a9ab27d commit 24d88ba
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions>
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>${tycho-version}</version>
</extension>
</extensions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bundle-Name: Bnd
Bundle-SymbolicName: pde.bnd
Bundle-Vendor:
Bundle-Version: 1.0.0.qualifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.eclipse.tycho.its</groupId>
<artifactId>pde-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<modules>
<module>bundle</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

public class TychoVersionsPluginTest extends AbstractTychoIntegrationTest {

private final String VERSION = TychoVersion.getTychoVersion();
private static final String VERSION = TychoVersion.getTychoVersion();

/**
* <p>
Expand Down Expand Up @@ -80,6 +80,19 @@ public void updateTargetVersionTest() throws Exception {
&& targetContent.contains("sequenceNumber=\"12\""));
}

@Test
public void updateTargetVersionBndTest() throws Exception {
String expectedNewVersion = "1.2.3";

Verifier verifier = getVerifier("tycho-version-plugin/set-version/pde-bnd", true);

verifier.addCliOption("-DnewVersion=" + expectedNewVersion);
verifier.executeGoal("org.eclipse.tycho:tycho-versions-plugin:" + VERSION + ":set-version");

verifier.verifyErrorFreeLog();
// TODO assertions
}

/**
* Verifies that the update-pom goal of the tycho-version plug-in updates the
* version of a pom when the pom file is implicit. The command line for this
Expand Down

0 comments on commit 24d88ba

Please sign in to comment.