aahancoc / tree_magic

Determines the MIME type of a file by traversing a filetype tree.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests are failing on master

lopopolo opened this issue · comments

I forked tree_magic because I'd like to submit a PR that updates its deps, but I don't have confidence I won't break anything because some tests are failing for me on master (nightly rust, macOS)

running 16 tests
test from_u8::application_zip ... ok
test from_u8::application_x_7z ... ok
test from_u8::image_gif ... ok
test from_u8::image_png ... ok
test from_u8::image_bmp ... ok
test from_u8::application_tar ... ok
test from_u8::image_tiff ... ok
test from_u8::image_x_portable_bitmap ... ok
test from_u8::image_x_pcx ... ok
test from_u8::image_x_tga ... ok
test from_u8::text_plain ... ok
test from_u8::audio_ogg ... FAILED
test from_u8::audio_opus ... FAILED
test from_u8::audio_mpeg ... ok
test from_u8::audio_wav ... FAILED
test from_u8::audio_flac ... ok

failures:

---- from_u8::audio_ogg stdout ----
thread 'from_u8::audio_ogg' panicked at 'assertion failed: `(left == right)`
  left: `"audio/x-vorbis+ogg"`,
 right: `"audio/ogg"`', tests/from_u8.rs:118:3
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

---- from_u8::audio_opus stdout ----
thread 'from_u8::audio_opus' panicked at 'assertion failed: `(left == right)`
  left: `"audio/x-opus+ogg"`,
 right: `"audio/opus"`', tests/from_u8.rs:126:3

---- from_u8::audio_wav stdout ----
thread 'from_u8::audio_wav' panicked at 'assertion failed: `(left == right)`
  left: `"application/x-riff"`,
 right: `"audio/wav"`', tests/from_u8.rs:134:3


failures:
    from_u8::audio_ogg
    from_u8::audio_opus
    from_u8::audio_wav

I'm getting same.

@lopopolo did you by any chance update nom? I'm hitting #15

If I remember correctly, those tests never worked. I was going to fix them, but I never got around to it. I think the problem is with the MIME aliasing, but I can't remember.