aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorMark Oteiza2017-09-06 13:17:05 -0400
committerMark Oteiza2017-09-06 13:17:05 -0400
commit9604f9cd33bcbc921fd18e894fdd8a98012fd09d (patch)
treee8c152189ae6f439fa57496dfc76596418543e08 /test/data
parentda3e1016349b2f552f149ccf577b60e377c3095a (diff)
downloademacs-9604f9cd33bcbc921fd18e894fdd8a98012fd09d.tar.gz
emacs-9604f9cd33bcbc921fd18e894fdd8a98012fd09d.zip
Add XDG desktop file parsing and tests
* lisp/xdg.el: Add support for Desktop Entry Specification. (xdg--user-dirs-parse-line): Check if file is readable. (xdg-desktop-group-regexp, xdg-desktop-entry-regexp): New variables. (xdg--desktop-parse-line, xdg-desktop-read-file, xdg-desktop-strings): New functions. * test/lisp/xdg-tests.el: * test/data/xdg/test.desktop: * test/data/xdg/wrong.desktop: New files.
Diffstat (limited to 'test/data')
-rw-r--r--test/data/xdg/test.desktop3
-rw-r--r--test/data/xdg/wrong.desktop2
2 files changed, 5 insertions, 0 deletions
diff --git a/test/data/xdg/test.desktop b/test/data/xdg/test.desktop
new file mode 100644
index 00000000000..b6dda62774a
--- /dev/null
+++ b/test/data/xdg/test.desktop
@@ -0,0 +1,3 @@
1# this is a comment
2[Desktop Entry]
3Name=Test
diff --git a/test/data/xdg/wrong.desktop b/test/data/xdg/wrong.desktop
new file mode 100644
index 00000000000..e0b4c221cf9
--- /dev/null
+++ b/test/data/xdg/wrong.desktop
@@ -0,0 +1,2 @@
1# the first section must be "Desktop Entry"
2[Why]