summaryrefslogtreecommitdiff
path: root/tests/mime-detection
Commit message (Collapse)AuthorAgeFilesLines
* application/x-apple-systemprofiler+xml: require _SPCommandLineArguments in plistwork/scop/jpeg-vs-systemprofilerVille Skyttä2021-09-081-0/+3
| | | | | | | | | | | | | | Look for `<key>_SPCommandLineArguments</key>` in addition to plist root element to distinguish from other property list XML files. Our offset specifiers aren't that fancy, so this can trigger on files that have the above string ´_before_ `<plist version="1.0"`, but those should be quite pathological cases. Start offset 34 is length of `<plist version="1.0"><array><dict>`, 384 is arbitrary guesswork. Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/169
* image/jpeg: add test case with embedded property list XMLVille Skyttä2021-09-082-0/+4
| | | | https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/169
* audio/vnd.dts.hd: include parent type magic in magic matchVille Skyttä2021-08-111-0/+2
| | | | | | | | | | | | | | | | | | | Matching just 0x64582025 within the first 18725 bytes of any file is prone to false positives. The priority of the magic match here being bumped to 60 seems to indicate intent to make it take precedence over the parent `audio/vnd.dts`. But we should take the parent magic into account here as it does not "inherit" with `sub-class-of`. As the comment for this match says "16bits HD be", accept only "16bits core be" as the parent at least for now, not all possible parent magics -- it would not seem consistent to have it in "14bits" variants, or the "16bits core le" one. The test case we have for this is one matching "16bits core be". Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/166 Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/167
* model/gltf+json: new typeVille Skyttä2021-07-292-0/+57
| | | | https://www.iana.org/assignments/media-types/model/gltf+json
* model/gltf-binary: new typeVille Skyttä2021-07-292-0/+2
| | | | https://www.iana.org/assignments/media-types/model/gltf-binary
* application/x-object: add *.mod and a test caseVille Skyttä2021-07-302-1/+2
| | | | | | For GRUB modules. Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/165
* application/x-mod: add some ProTracker magics and a test caseVille Skyttä2021-07-302-0/+2
| | | | https://wiki.multimedia.cx/index.php/Protracker_Module#File_Format
* *: delete trailing whitespaceVille Skyttä2021-07-301-3/+3
|
* image/jxl: include test files in test listVille Skyttä2021-06-301-0/+2
| | | | | | | | I failed to include the test files in the list in 238f20f82d485dafa16904c5bd1b07c8034ddacd, and unfortunately can no longer remember their origin. I likely took an existing one from the test suite and converted from it, but the details and tools used escape me.
* tests: add trailing linefeed to mime-detection listVille Skyttä2021-06-281-1/+1
| | | | | | My editor keeps adding it (which is nice), but I need to remove it manually all the time not to include it as unrelated whitespace in other commits (which is not). Just add it.
* application/x-x509-ca-cert: add magics and test casesVille Skyttä2021-06-243-0/+64
| | | | | | "BEGIN/END CA CERTIFICATE" seems to be a thing, although not that common. "BEGIN/END TRUSTED CERTIFICATE" is an OpenSSL marker for trusted certificates, see x509(1).
* application/pkix-cert: add BEGIN/END X509 CERTIFICATE magicVille Skyttä2021-06-242-0/+32
|
* application/pkix-crl: add magic and test caseVille Skyttä2021-06-242-0/+19
|
* application/pkix-cert: add magic and test caseVille Skyttä2021-06-242-0/+32
|
* image/jxl: new typeVille Skyttä2021-06-062-0/+0
| | | | Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/159
* application/schema+json: new typeAlex Henrie2021-05-282-0/+7
| | | | | | | JSON Schema files are distinguished from other JSON files by a "$schema" property which is typically at the beginning of the file. https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00
* Add text/x-crystalGeopJr2021-05-282-0/+3
|
* adding org-modeGiovanni Alfredo Garciliano Díaz2021-05-272-0/+18
|
* text/x-python3: add *.pyi glob (Python stub files)Illia Volochii2021-05-272-0/+2
| | | | | | | | | | Stub files are files containing type hints, they are written in normal Python 3 syntax, but generally leaving out runtime logic like variable initializers, function bodies, and default arguments. https://www.python.org/dev/peps/pep-0484/#stub-files https://mypy.readthedocs.io/en/stable/stubs.html#stub-file-syntax
* image/x-xpixmap: add XPM2 magicVille Skyttä2021-05-132-0/+13
| | | | https://en.wikipedia.org/wiki/X_PixMap#XPM2
* application/x-troff-man: add *.[1-9] globVille Skyttä2021-05-131-0/+1
|
* application/toml: new typeVille Skyttä2021-05-122-0/+25
| | | | | | https://toml.io/en/v1.0.0#mime-type Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/156
* Lower priority of "BEGIN {" for perl, awk uses that toowork/dfaure/issue155David Faure2021-04-252-0/+4
| | | | Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/155
* application/x-7z-compressed: add *.7z.001 globVille Skyttä2021-02-242-0/+1
| | | | These are the first files of a multivolume archive.
* image/x-nikon-nrw: add test caseVille Skyttä2021-02-072-0/+2
| | | | https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/124#note_788636
* application/ovf: newVille Skyttä2021-01-132-0/+3
| | | | https://en.wikipedia.org/wiki/Open_Virtualization_Format
* application/x-qed-disk: newVille Skyttä2021-01-132-0/+2
| | | | https://wiki.qemu.org/Features/QED
* application/x-vdi-disk: newVille Skyttä2021-01-132-0/+2
| | | | https://en.wikipedia.org/wiki/VirtualBox#VirtualBox_Disk_Image
* application/x-vmdk-disk: newVille Skyttä2021-01-132-0/+2
| | | | https://en.wikipedia.org/wiki/VMDK
* application/x-vhd-disk, /x-vhdx-disk: newVille Skyttä2021-01-133-1/+5
| | | | https://en.wikipedia.org/wiki/VHD_(file_format)
* application/vnd.apple.numbers, .pages: add older magics and test casesVille Skyttä2021-01-103-0/+4
| | | | | Numbers 3.5 and Pages 5.5 appear to place an Index/Document.iwa, not index.xml there.
* Add text/x-dartJan Tojnar2021-01-102-0/+6
| | | | | | Dart is a programming language by Google. https://dart.dev/
* text/x-python: add text/x-modelica false positive test casework/scop/python-modelica-false-positiveVille Skyttä2020-12-312-0/+9
| | | | | | Fixed by https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/3 Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/127
* audio/mpeg: add layer 2, 2.5, and 1 protected magicsmasato2020-12-308-1/+14
| | | | Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/46
* Adapt to xdgmime behaviour change.work/dfaure/adapt_to_xdgmime_changeDavid Faure2020-12-301-2/+2
| | | | | | | | | | | | | As the spec says, if the result from magic sniffing doesn't match one of the globs, ignore it and return one of the globs. With this change, test-garbage.key (which was already a doubtful testcase, see !5) no longer falls back to application/octet-stream but to one of the globs. test-really-html-not-xhtml.html is also fixed by this, it's detected as text/html. Closes: #138.
* audio/x-mod: magic match 669 Composer files' tempo tableVille Skyttä2020-12-281-1/+1
| | | | | | | | | | | | | According to mikmod, the tempo table is 128 bytes containing values ranging from 1 to 32, inclusive. We don't have good means to test all those 128 bytes, but look into the last one to make it rule out some short files. Also, accept 0 for the time being due to our match expression limitations. 0-31 being ASCII control characters gives this a better chance to avoid matching random ASCII files out there. Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/144
* audio/x-mod: add known false positive 669 Composer test caseVille Skyttä2020-12-282-0/+27
| | | | Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/144
* text/markdown: add Pandoc flavored test caseVille Skyttä2020-12-262-0/+8
| | | | Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/138
* Add Khronos image texture format version 2Kai Uwe Broulik2020-12-262-0/+2
| | | | | | | Its draft specification [1] calls for a "*.ktx2" glob and "image/ktx2" type as it contains backwards-incompatible changes over version 1. [1] http://github.khronos.org/KTX-Specification/
* application/oxps, /vnd.ms-xpsdocument: add test casesVille Skyttä2020-12-263-0/+3
|
* image/g3fax: add test caseVille Skyttä2020-12-252-0/+2
|
* text/vnd.trolltech.linguist: swap main/alias with /vnd.qt.linguistVille Skyttä2020-12-251-1/+1
| | | | The former is the IANA registered type.
* application/vnd.smaf: swap main/alias with /x-smafVille Skyttä2020-12-251-1/+1
| | | | The former is the IANA registered type.
* application/vnd.apple.keynote: swap main/alias with /x-iwork-keynote-sffkeyVille Skyttä2020-12-251-1/+1
| | | | | The latter is deprecated per https://www.iana.org/assignments/media-types/application/vnd.apple.keynote
* Add image/astcKai Uwe Broulik2020-11-212-0/+2
| | | | Adaptive Scalable Texture Compression files
* Add application/x-mame-chdAdrien Plazas2020-11-082-0/+2
|
* Add application/nintendo-3ds-executableAlexander Mikhaylenko2020-11-082-0/+2
| | | | | According to https://3dbrew.org/wiki/3DSX_Format, they start from '3DSX' magic value and have .3dsx extension.
* Add application/x-nintendo-3ds-romAlexander Mikhaylenko2020-11-082-0/+2
| | | | | | | Nintendo 3DS ROMs can have *.3ds or *.cci extensions. According to https://3dbrew.org/wiki/CCI, they have 'NCSD' magic number at 0x100 offset.
* Add magic for image/x-3dsAlexander Mikhaylenko2020-11-082-0/+2
| | | | | The next commit will add another MIME type with the same glob, avoid breakage.
* Update freedesktop.org.xml.in : add .sage file format for SageMath script filesFrédéric Chapoton2020-11-072-0/+16
|