test: Add regression tests for #159
This commit is contained in:
parent
e052842d78
commit
fce5e0a2d3
3 changed files with 16 additions and 0 deletions
16
src/read.rs
16
src/read.rs
|
@ -1793,4 +1793,20 @@ mod test {
|
|||
let mut reader = ZipArchive::new(Cursor::new(v)).unwrap();
|
||||
reader.by_name("七个房间.txt").unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_utf8() {
|
||||
let mut v = Vec::new();
|
||||
v.extend_from_slice(include_bytes!("../tests/data/linux-7z.zip"));
|
||||
let mut reader = ZipArchive::new(Cursor::new(v)).unwrap();
|
||||
reader.by_name("你好.txt").unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_utf8_2() {
|
||||
let mut v = Vec::new();
|
||||
v.extend_from_slice(include_bytes!("../tests/data/windows-7zip.zip"));
|
||||
let mut reader = ZipArchive::new(Cursor::new(v)).unwrap();
|
||||
reader.by_name("你好.txt").unwrap();
|
||||
}
|
||||
}
|
||||
|
|
BIN
tests/data/linux-7z.zip
Normal file
BIN
tests/data/linux-7z.zip
Normal file
Binary file not shown.
BIN
tests/data/windows-7zip.zip
Normal file
BIN
tests/data/windows-7zip.zip
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue