Add function to read all entries in a group
commit4131f9785e30f2a31745125c714e922892113c62
authorMark Oteiza <mvoteiza@udel.edu>
Sat, 9 Sep 2017 15:55:09 +0000 (9 11:55 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Sat, 9 Sep 2017 16:26:50 +0000 (9 12:26 -0400)
tree56858ce56448c799997008648b23e647cebd526d
parent68b7ecbac1dcb5bfcace5505a4d354777147dd54
Add function to read all entries in a group

Use that to extend xdg-desktop-read-file.  Also fix a bug where all
entries in all groups were read and returned by xdg-desktop-read-file.
* lisp/xdg.el (xdg-desktop-read-group): New function.
(xdg-desktop-read-file): Use it.
* test/data/xdg/malformed.desktop: New file.
* test/data/xdg/test.desktop: Add another section.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Test presence of a key
in another group.  Test reading a prescribed group.  Test detecting a
malformed key=value.
lisp/xdg.el
test/data/xdg/malformed.desktop [new file with mode: 0644]
test/data/xdg/test.desktop
test/lisp/xdg-tests.el