mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 06:46:32 +03:00
Add failing test_sanitise_name() test
This commit is contained in:
committed by
Floris Bruynooghe
parent
fb568513b2
commit
4c67b3a118
@@ -631,4 +631,11 @@ mod tests {
|
|||||||
assert!(!BlobObject::is_acceptible_blob_name("foo\\bar"));
|
assert!(!BlobObject::is_acceptible_blob_name("foo\\bar"));
|
||||||
assert!(!BlobObject::is_acceptible_blob_name("foo\x00bar"));
|
assert!(!BlobObject::is_acceptible_blob_name("foo\x00bar"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_sanitise_name() {
|
||||||
|
let (_, ext) =
|
||||||
|
BlobObject::sanitise_name("Я ЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯЯ.txt");
|
||||||
|
assert_eq!(ext, ".txt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user