mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-16 23:42:27 +00:00
Cover oversized control lines
This commit is contained in:
1 parent
72da2d5d05
commit
d6d4f2bd4c
1 file changed
+6
@@ -46,5 +46,11 @@ mod tests {
|
||||
assert!(process_line("{", 100, call).unwrap().contains("bad request envelope:"));
|
||||
assert_eq!(process_line(r#"{"id":3}"#, 100, call).unwrap(), r#"{"error":"missing `method`","id":3,"ok":false}"#);
|
||||
assert!(process_line("abcdef", 2, call).unwrap().contains("byte limit"));
|
||||
let invoked = std::cell::Cell::new(false);
|
||||
let _ = process_line(" ", 2, |_, _| -> Result<Value, &'static str> {
|
||||
invoked.set(true);
|
||||
Ok(Value::Null)
|
||||
});
|
||||
assert!(!invoked.get());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user