diff options
author | Mark McLoughlin <mark@skynet.ie> | 2005-04-25 12:00:06 +0000 |
---|---|---|
committer | Mark McLoughlin <mark@skynet.ie> | 2005-04-25 12:00:06 +0000 |
commit | 84a56ac520898a0a5553cd45c975c6ebf5e58dd7 (patch) | |
tree | efe18a9f3e51e0065a960a8dcfe09bd29c9437ce | |
parent | bb600038d866852ff90f0124ba2fe6526b71585d (diff) | |
download | xdg-specs-84a56ac520898a0a5553cd45c975c6ebf5e58dd7.tar.xz |
add test for recursive inclusion of .menu files. Also know as the "get
2005-04-25 Mark McLoughlin <mark@skynet.ie>
* tests/u: add test for recursive inclusion of .menu files.
Also know as the "get really hosed and eat all the RAM
you can find" test.
-rw-r--r-- | menu/tests/ChangeLog | 6 | ||||
-rw-r--r-- | menu/tests/tests/u/result | 5 | ||||
-rw-r--r-- | menu/tests/tests/u/test | 58 |
3 files changed, 69 insertions, 0 deletions
diff --git a/menu/tests/ChangeLog b/menu/tests/ChangeLog index b813a7e..ac55e4f 100644 --- a/menu/tests/ChangeLog +++ b/menu/tests/ChangeLog @@ -1,3 +1,9 @@ +2005-04-25 Mark McLoughlin <mark@skynet.ie> + + * tests/u: add test for recursive inclusion of .menu files. + Also know as the "get really hosed and eat all the RAM + you can find" test. + 2005-04-20 Waldo Bastian <bastian@kde.org> * tests/s/result, diff --git a/menu/tests/tests/u/result b/menu/tests/tests/u/result new file mode 100644 index 0000000..de216fc --- /dev/null +++ b/menu/tests/tests/u/result @@ -0,0 +1,5 @@ +Applications/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Applications/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Applications/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop +Development/ kbabel.desktop /tmp/menutestdir/xdg_data_dir/applications/kbabel.desktop +Development/ quanta.desktop /tmp/menutestdir/xdg_data_dir/applications/quanta.desktop diff --git a/menu/tests/tests/u/test b/menu/tests/tests/u/test new file mode 100644 index 0000000..49ce526 --- /dev/null +++ b/menu/tests/tests/u/test @@ -0,0 +1,58 @@ +echo ">>> recursive <MergeFile>s ..." + +# Test elaborate recursive loop in <MergeFile>s + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <DefaultAppDirs/> + <MergeFile>applications-merged/test.menu</MergeFile> + + <Menu> + <Name>Applications</Name> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + + +mkdir ${XDG_CONFIG_DIR}/menus/applications-merged/ +./expand > ${XDG_CONFIG_DIR}/menus/applications-merged/test.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + + <MergeFile>extra/test.menu</MergeFile> +</Menu> +EOF + +mkdir ${XDG_CONFIG_DIR}/menus/applications-merged/extra/ +./expand > ${XDG_CONFIG_DIR}/menus/applications-merged/extra/test.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + + <Menu> + <Name>Development</Name> + <Include> + <Category>Development</Category> + </Include> + </Menu> + + <MergeFile>../test.menu</MergeFile> +</Menu> +EOF + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop |