mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Windows: got rid on JNA, thus no more UnsatisfiedLinkError (at least when accessing native OS functions). Fixes #3190
This commit is contained in:
29
app/test/processing/app/windows/RegQueryParserTest.java
Normal file
29
app/test/processing/app/windows/RegQueryParserTest.java
Normal file
@ -0,0 +1,29 @@
|
||||
package processing.app.windows;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class RegQueryParserTest {
|
||||
|
||||
@Test
|
||||
public void testRegQueryParser() throws Exception {
|
||||
String output = "! REG.EXE VERSION 3.0\n" +
|
||||
"\n" +
|
||||
"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\n" +
|
||||
"\n" +
|
||||
" Local AppData REG_SZ C:\\Documents and Settings\\username\\My Documents";
|
||||
|
||||
String folderPath = new RegQueryParser(output).getValueOfKey();
|
||||
assertEquals("C:\\Documents and Settings\\username\\My Documents", folderPath);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRegQueryParser2() throws Exception {
|
||||
String output = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\n" +
|
||||
" Local AppData REG_SZ C:\\Users\\username\\AppData\\Local";
|
||||
|
||||
String folderPath = new RegQueryParser(output).getValueOfKey();
|
||||
assertEquals("C:\\Users\\username\\AppData\\Local", folderPath);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user