We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63cb04d commit 3063d69Copy full SHA for 3063d69
tests/test.rs
@@ -2497,3 +2497,22 @@ fn hash_positive_and_negative_zero() {
2497
assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
2498
}
2499
2500
+
2501
+#[test]
2502
+fn test_control_character_search() {
2503
+ // Different space circumstances
2504
+ for n in 0..16 {
2505
+ for m in 0..16 {
2506
+ test_parse_err::<String>(&[(
2507
+ &format!("\"{}\n{}\"", ".".repeat(n), ".".repeat(m)),
2508
+ "control character (\\u0000-\\u001F) found while parsing a string at line 2 column 0",
2509
+ )]);
2510
+ }
2511
2512
2513
+ // Multiple occurrences
2514
2515
+ &"\"\t\n\r\"",
2516
+ "control character (\\u0000-\\u001F) found while parsing a string at line 1 column 2",
2517
2518
+}
0 commit comments