WifiParsedResultTestCase.java (zxing-zxing-3.4.1) | : | WifiParsedResultTestCase.java (zxing-zxing-3.5.0) | ||
---|---|---|---|---|
skipping to change at line 72 | skipping to change at line 72 | |||
doTest("WIFI:S:TenChars;P:hello\\;there;T:WEP;;", "TenChars", "hello;there", "WEP"); | doTest("WIFI:S:TenChars;P:hello\\;there;T:WEP;;", "TenChars", "hello;there", "WEP"); | |||
// Escaped colons | // Escaped colons | |||
doTest("WIFI:S:TenChars;P:hello\\:there;T:WEP;;", "TenChars", "hello:there", "WEP"); | doTest("WIFI:S:TenChars;P:hello\\:there;T:WEP;;", "TenChars", "hello:there", "WEP"); | |||
} | } | |||
@Test | @Test | |||
public void testEscape() { | public void testEscape() { | |||
doTest("WIFI:T:WPA;S:test;P:my_password\\\\;;", "test", "my_password\\", "WP A"); | doTest("WIFI:T:WPA;S:test;P:my_password\\\\;;", "test", "my_password\\", "WP A"); | |||
doTest("WIFI:T:WPA;S:My_WiFi_SSID;P:abc123/;;", "My_WiFi_SSID", "abc123/", " WPA"); | doTest("WIFI:T:WPA;S:My_WiFi_SSID;P:abc123/;;", "My_WiFi_SSID", "abc123/", " WPA"); | |||
doTest("WIFI:T:WPA;S:\"foo\\;bar\\\\baz\";;", "\"foo;bar\\baz\"", null, "WPA "); | doTest("WIFI:T:WPA;S:\"foo\\;bar\\\\baz\";;", "\"foo;bar\\baz\"", null, "WPA "); | |||
doTest("WIFI:T:WPA;S:test;P:\\\"abcd\\\";;", "test", "\"abcd\"", "WPA"); | ||||
} | } | |||
/** | /** | |||
* Given the string contents for the barcode, check that it matches our expect ations | * Given the string contents for the barcode, check that it matches our expect ations | |||
*/ | */ | |||
private static void doTest(String contents, | private static void doTest(String contents, | |||
String ssid, | String ssid, | |||
String password, | String password, | |||
String type) { | String type) { | |||
Result fakeResult = new Result(contents, null, null, BarcodeFormat.QR_CODE); | Result fakeResult = new Result(contents, null, null, BarcodeFormat.QR_CODE); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added |