1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-20 21:01:25 +03:00

Windows: reg query uses different separators on xp, fooling parser. Fixed

This commit is contained in:
Federico Fissore
2015-06-04 11:44:56 +02:00
parent 3c982759c2
commit e9d66015a4
2 changed files with 16 additions and 3 deletions

View File

@ -26,4 +26,17 @@ public class RegQueryParserTest {
String folderPath = new RegQueryParser(output).getValueOfKey();
assertEquals("C:\\Users\\username\\AppData\\Local", folderPath);
}
@Test
public void testRegQueryParserXP() throws Exception {
String output = "! REG.EXE VERSION 3.0\n" +
"\n" +
"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\n" +
"\n" +
"\tLocal 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);
}
}