Skip to content

Commit

Permalink
Add "test" for Debug representation of zip::Archive type
Browse files Browse the repository at this point in the history
This change adds a test ensuring coverage of the Debug impl of the
zip::Archive type.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o authored and danielocfb committed Oct 20, 2023
1 parent 944b731 commit e554db8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,15 @@ mod tests {
use crate::ErrorKind;


/// Check that the `Debug` representation of [`Entry`] is as expected.
/// Exercise the `Debug` representation of various types.
#[test]
fn zip_entry_debug() {
fn debug_repr() {
let zip = Path::new(&env!("CARGO_MANIFEST_DIR"))
.join("data")
.join("test.zip");
let archive = Archive::open(zip).unwrap();
assert_ne!(format!("{archive:?}"), "");

let entry = Entry {
compression: 42,
path: Path::new("some-entry-path.so"),
Expand Down

0 comments on commit e554db8

Please sign in to comment.