MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_invalid_utf8

Function test_invalid_utf8

arrow-csv/src/reader/mod.rs:2584–2604  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2582
2583 #[test]
2584 fn test_invalid_utf8() {
2585 err_test(
2586 b"sdf,dsfg\ndfd,hgh\xFFue\n,sds\nFalhghse,",
2587 "Csv error: Encountered invalid UTF-8 data for line 2 and field 2",
2588 );
2589
2590 err_test(
2591 b"sdf,dsfg\ndksdk,jf\nd\xFFfd,hghue\n,sds\nFalhghse,",
2592 "Csv error: Encountered invalid UTF-8 data for line 3 and field 1",
2593 );
2594
2595 err_test(
2596 b"sdf,dsfg\ndksdk,jf\ndsdsfd,hghue\n,sds\nFalhghse,\xFF",
2597 "Csv error: Encountered invalid UTF-8 data for line 5 and field 2",
2598 );
2599
2600 err_test(
2601 b"\xFFsdf,dsfg\ndksdk,jf\ndsdsfd,hghue\n,sds\nFalhghse,\xFF",
2602 "Csv error: Encountered invalid UTF-8 data for line 1 and field 1",
2603 );
2604 }
2605
2606 struct InstrumentedRead<R> {
2607 r: R,

Callers

nothing calls this directly

Calls 1

err_testFunction · 0.85

Tested by

no test coverage detected