diff options
Diffstat (limited to 'menu/tests/tests/MergeFile2/test')
-rw-r--r-- | menu/tests/tests/MergeFile2/test | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/menu/tests/tests/MergeFile2/test b/menu/tests/tests/MergeFile2/test new file mode 100644 index 0000000..e5b1591 --- /dev/null +++ b/menu/tests/tests/MergeFile2/test @@ -0,0 +1,57 @@ +TEST_PURPOSE="<MergeFile> tag ..." + +test_code() { + # Tests the use of relative paths in <MergeFile> + + # 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> +</Menu> +EOF + + # Install .desktop files + installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop +} |