summaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-09-24 22:28:51 -0400
committerMark Oteiza <mvoteiza@udel.edu>2017-09-26 17:48:00 -0400
commita17f30d7cdfa3983f8c97e474015777ec051de35 (patch)
tree9c56ff4e146b9f1c071cb31541e00a1b3fa2e215 /test/data
parent52a1da03b226b8686856259ac5d9474a8462322a (diff)
downloademacs-a17f30d7cdfa3983f8c97e474015777ec051de35.tar.gz
Add MIME apps spec utilities
Facilitates finding associations between MIME types and desktop files that report an association with that type. Combined with mailcap.el's MIME facilities, it should be easy to use desktop files. * lisp/xdg.el (xdg-mime-table): New variable. (xdg-mime-apps-files, xdg-mime-collect-associations, xdg-mime-apps): New functions. * test/data/xdg/mimeapps.list: New file. * test/data/xdg/mimeinfo.cache: New file. * test/lisp/xdg-tests.el (xdg-mime-associations): New test.
Diffstat (limited to 'test/data')
-rw-r--r--test/data/xdg/mimeapps.list9
-rw-r--r--test/data/xdg/mimeinfo.cache4
2 files changed, 13 insertions, 0 deletions
diff --git a/test/data/xdg/mimeapps.list b/test/data/xdg/mimeapps.list
new file mode 100644
index 00000000000..27fbd94b16b
--- /dev/null
+++ b/test/data/xdg/mimeapps.list
@@ -0,0 +1,9 @@
+[Default Applications]
+x-test/foo=a.desktop
+
+[Added Associations]
+x-test/foo=b.desktop
+x-test/baz=a.desktop
+
+[Removed Associations]
+x-test/foo=c.desktop;d.desktop
diff --git a/test/data/xdg/mimeinfo.cache b/test/data/xdg/mimeinfo.cache
new file mode 100644
index 00000000000..6e54f604fa0
--- /dev/null
+++ b/test/data/xdg/mimeinfo.cache
@@ -0,0 +1,4 @@
+[MIME Cache]
+x-test/foo=c.desktop;d.desktop
+x-test/bar=a.desktop;c.desktop
+x-test/baz=b.desktop;d.desktop