"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/test/java/com/google/zxing/client/result/WifiParsedResultTestCase.java" between
zxing-zxing-3.4.0.tar.gz and zxing-zxing-3.4.1.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.

WifiParsedResultTestCase.java  (zxing-zxing-3.4.0):WifiParsedResultTestCase.java  (zxing-zxing-3.4.1)
skipping to change at line 70 skipping to change at line 70
// Escaped semicolons // Escaped semicolons
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:\"foo\\;bar\\\\baz\";;", "\"foo;bar\\baz\"", null, "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 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)