Skip to content

Commit 25bae43

Browse files
committed
added a test for GpgVersion.isBefore() in GpgVersionTest
1 parent cd0f6d3 commit 25bae43

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test/java/org/apache/maven/plugins/gpg/GpgVersionTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import org.junit.Test;
2323

24+
import static org.junit.Assert.assertFalse;
2425
import static org.junit.Assert.assertTrue;
2526

2627
/**
@@ -38,4 +39,13 @@ public void test()
3839
.isAtLeast( GpgVersion.parse( "2.0.26" ) ) );
3940
}
4041

42+
@Test
43+
public void testOpposite()
44+
{
45+
assertFalse( GpgVersion.parse( "gpg (GnuPG) 2.2.1" ).isBefore( GpgVersion.parse( "gpg (GnuPG) 2.2.1" ) ) );
46+
assertFalse( GpgVersion.parse( "gpg (GnuPG) 2.2.1" ).isBefore( GpgVersion.parse( "2.1" ) ) );
47+
assertFalse( GpgVersion.parse( "gpg (GnuPG/MacGPG2) 2.2.10" ).isBefore( GpgVersion.parse( "2.2.10" ) ) );
48+
assertFalse( GpgVersion.parse( "gpg (GnuPG) 2.0.26 (Gpg4win 2.2.3)" )
49+
.isBefore( GpgVersion.parse( "2.0.26" ) ) );
50+
}
4151
}

0 commit comments

Comments
 (0)