Skip to content

Test test_difference fails on quine test with file 5.39

On openSUSE Tumbleweed I get this test fail:

[   31s] _______________________________ test_difference ________________________________
[   31s] 
[   31s] differences = [<Difference filetype from file(1) -- filetype from file(1) []>, <Difference filetype from diffoscope -- filetype from...ent -- r/r.zip []>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]>]
[   31s] 
[   31s]     @skip_unless_file_version_is_at_least("5.37")
[   31s]     def test_difference(differences):
[   31s]         expected_diff = get_data("quine_expected_diff")
[   31s] >       assert differences[0].unified_diff == expected_diff
[   31s] E       assert '@@ -1 +1 @@\... to extract\n' == '@@ -1 +1 @@\... to extract\n'
[   31s] E           @@ -1 +1 @@
[   31s] E           -gzip compressed data, was "recursive", from FAT filesystem (MS-DOS, OS/2, NT)
[   31s] E         - +Zip archive data, at least v2.0 to extract
[   31s] E         + +Zip archive data, at least v2.0 to extract Zip archive data, at least v2.0 to extract

The version of file is 5.39

For the quine file, file returns:

$ file diffoscope-168/tests/data/quine.zip 
diffoscope-168/tests/data/quine.zip: Zip archive data, at least v2.0 to extract Zip archive data, at least v2.0 to extract

While this seems to be expected:

Zip archive data, at least v2.0 to extract

I don't know if this could be a bug in this version of file.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information