Skip to content

Commit

Permalink
Move djvu format to Document kind
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecot committed Jan 24, 2024
1 parent 7ad9d5f commit cdb7af9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ identification.
- AbiWord (ABW)
- AbiWord Template (AWT)
- Adobe InDesign Document (INDD)
- DjVu
- InDesign Markup Language (IDML)
- LaTeX (TeX)
- Microsoft Publisher Document (PUB)
Expand Down Expand Up @@ -286,7 +287,6 @@ identification.
- Canon Raw 3 (CR3)
- Cineon (CIN)
- Digital Picture Exchange (DPX)
- DjVu
- Encapsulated PostScript (EPS)
- Experimental Computing Facility (XCF)
- Free Lossless Image Format (FLIF)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ formats! {
name = "DjVu"
media_type = "image/vnd.djvu"
extension = "djvu"
kind = Image
kind = Document

format = DrawingExchangeFormatAscii
name = "Drawing Exchange Format ASCII"
Expand Down
6 changes: 6 additions & 0 deletions tests/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ fn test_indesign_markup_language() {
assert_eq!(fmt, FileFormat::IndesignMarkupLanguage);
}

#[test]
fn test_djvu() {
let fmt = FileFormat::from_file("fixtures/document/sample.djvu").unwrap();
assert_eq!(fmt, FileFormat::Djvu);
}

#[test]
fn test_latex() {
let fmt = FileFormat::from_file("fixtures/document/sample.tex").unwrap();
Expand Down
6 changes: 0 additions & 6 deletions tests/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ fn test_digital_picture_exchange() {
assert_eq!(fmt, FileFormat::DigitalPictureExchange);
}

#[test]
fn test_djvu() {
let fmt = FileFormat::from_file("fixtures/image/sample.djvu").unwrap();
assert_eq!(fmt, FileFormat::Djvu);
}

#[test]
fn test_encapsulated_postscript() {
let fmt = FileFormat::from_file("fixtures/image/sample.eps").unwrap();
Expand Down

0 comments on commit cdb7af9

Please sign in to comment.