diff options
Diffstat (limited to 'menu/tests')
-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 |