Skip to content

Commit

Permalink
tests: add regression test for the mime of empty, extensionless files
Browse files Browse the repository at this point in the history
  • Loading branch information
Anomalocaridid committed Jul 30, 2024
1 parent 0e1ee0b commit 5b07276
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/mime_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ mod tests {
MimeType::try_from(Path::new("./tests/no_html_tags.html"))?.0,
"text/html"
);
assert_eq!(
MimeType::try_from(Path::new("./tests/empty"))?.0,
"application/x-zerosize"
);

Ok(())
}
Expand Down
Empty file added tests/empty
Empty file.

0 comments on commit 5b07276

Please sign in to comment.