mime-detection tests succeed for nonexistent files
$ echo "nonexistent.bmp image/bmp" >> tests/mime-detection/list; ninja -C _build test
ninja: Entering directory `_build'
[0/1] Running all tests.
1/10 test-staging OK 0.01s
2/10 No duplicate mime-types OK 0.16s
3/10 Single spelling case OK 0.20s
4/10 xmllint freedesktop.org.xml OK 0.09s
5/10 Case sensitivity OK 0.04s
6/10 Sanity check sub-class-of OK 0.19s
7/10 ITS validation OK 0.01s
8/10 translations OK 0.41s
9/10 update-mime-database OK 0.22s
10/10 test-mime OK 8.53s
Ok: 10
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Full log written to .../shared-mime-info/_build/meson-logs/testlog.txt
I don't think any mime-detection tests for which the specified test file is not present should pass.
Or, if we want to have a more relaxed go at this, letting filename based tests pass without a test file would be ok as we don't really need a file for that, but IMNSHO at the very least cases that explicitly/implicitly state that the file data lookup is expected to pass should fail if the test file is not present. As there is nothing to even test the magics against, they cannot really be said to match/pass.
Edited by Ville Skyttä