summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2021-09-08 09:34:42 +0300
committerVille Skyttä <ville.skytta@iki.fi>2021-09-08 09:40:11 +0300
commitfe73d839b4ed8348a783173ecea37ca90dd578d5 (patch)
treeb2b00ef63d2a1f732da1d59280c8d5b79c7e0d73 /tests
parent46b84f431d1435778f8f3811e6fceb0ab5190cb8 (diff)
downloadshared-mime-info-fe73d839b4ed8348a783173ecea37ca90dd578d5.tar.gz
application/x-apple-systemprofiler+xml: require _SPCommandLineArguments in plistwork/scop/jpeg-vs-systemprofiler
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
Diffstat (limited to 'tests')
-rw-r--r--tests/mime-detection/test_apple_systemprofiler.spx3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/mime-detection/test_apple_systemprofiler.spx b/tests/mime-detection/test_apple_systemprofiler.spx
index 28834e96..cdafe0ee 100644
--- a/tests/mime-detection/test_apple_systemprofiler.spx
+++ b/tests/mime-detection/test_apple_systemprofiler.spx
@@ -2,6 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
+ <dict>
+ <key>_SPCommandLineArguments</key>
<!-- Incomplete file, used to test for extension mismatch vs Speex *.spx -->
+ </dict>
</array>
</plist>