Skip to content

Commit

Permalink
Pom updates and test fix for OS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhat committed Mar 24, 2022
1 parent a4d6e0c commit 7c320c4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.2</version>
<version>1.2.7</version>

<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
Expand Down Expand Up @@ -404,7 +404,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.7</version>

<configuration>
<excludes>
Expand Down Expand Up @@ -472,7 +472,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>

<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package com.github.kwhat.jnativehook.keyboard;

import com.github.kwhat.jnativehook.NativeInputEvent;
import org.junit.jupiter.api.Test;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
Expand Down Expand Up @@ -188,7 +189,20 @@ public void testParamString() throws IllegalAccessException {
NativeKeyEvent.KEY_LOCATION_UNKNOWN);

assertTrue(event.paramString().startsWith("NATIVE_KEY_PRESSED"));
assertTrue(event.paramString().contains("modifiers=Shift+Ctrl+Meta+Alt+Button1+Button2+Button3+Button4+Button5+Num Lock+Caps Lock+Scroll Lock,"));
assertTrue(event.paramString().contains("modifiers="
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.SHIFT_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.CTRL_MASK) + '+'
+ NativeInputEvent.getModifiersText(NativeKeyEvent.META_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.ALT_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.BUTTON1_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.BUTTON2_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.BUTTON3_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.BUTTON4_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.BUTTON5_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.NUM_LOCK_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.CAPS_LOCK_MASK) + '+'
+ NativeKeyEvent.getModifiersText(NativeKeyEvent.SCROLL_LOCK_MASK))
);
assertTrue(event.paramString().contains("KEY_LOCATION_UNKNOWN"));

event = new NativeKeyEvent(
Expand Down

0 comments on commit 7c320c4

Please sign in to comment.