Add test with empty blob (issue #174).

This commit is contained in:
gwenn 2016-06-13 20:22:21 +02:00
parent 982499ba51
commit 95050f10a8

View File

@ -129,6 +129,17 @@ mod test {
assert_eq!(v, v1234);
}
#[test]
fn test_empty_blob() {
let db = checked_memory_handle();
let empty = vec![];
db.execute("INSERT INTO foo(b) VALUES (?)", &[&empty]).unwrap();
let v: Vec<u8> = db.query_row("SELECT b FROM foo", &[], |r| r.get(0)).unwrap();
assert_eq!(v, empty);
}
#[test]
fn test_str() {
let db = checked_memory_handle();