diff options
-rw-r--r-- | menu/tests/tests/x/result | 1 | ||||
-rw-r--r-- | menu/tests/tests/x/test | 31 | ||||
-rw-r--r-- | menu/tests/tests/y/result | 1 | ||||
-rw-r--r-- | menu/tests/tests/y/test | 45 |
4 files changed, 78 insertions, 0 deletions
diff --git a/menu/tests/tests/x/result b/menu/tests/tests/x/result new file mode 100644 index 0000000..f1c44ef --- /dev/null +++ b/menu/tests/tests/x/result @@ -0,0 +1 @@ +A/B/Development/ gideon-legacy.desktop ${XDG_DATA_DIR}/applications/gideon-legacy.desktop diff --git a/menu/tests/tests/x/test b/menu/tests/tests/x/test new file mode 100644 index 0000000..d260172 --- /dev/null +++ b/menu/tests/tests/x/test @@ -0,0 +1,31 @@ +echo ">>> Move into a new Submenu" + +# 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> + <!-- Search the default locations --> + <DefaultAppDirs/> + <DefaultDirectoryDirs/> + + <Menu> + <Name>Development</Name> + <Include> + <Filename>gideon-legacy.desktop</Filename> + </Include> + </Menu> + <Move> + <Old>Development</Old> + <New>A/B/Development</New> + </Move> +</Menu> +EOF + + +# Install .desktop files + +installData ${XDG_DATA_DIR}/applications gideon-legacy.desktop diff --git a/menu/tests/tests/y/result b/menu/tests/tests/y/result new file mode 100644 index 0000000..999bd1e --- /dev/null +++ b/menu/tests/tests/y/result @@ -0,0 +1 @@ +Editors/ kwrite.desktop ${XDG_DATA_DIR}/applications/kwrite.desktop diff --git a/menu/tests/tests/y/test b/menu/tests/tests/y/test new file mode 100644 index 0000000..44a2b8a --- /dev/null +++ b/menu/tests/tests/y/test @@ -0,0 +1,45 @@ +echo ">>> Merge Two Menus and a Legacy Menu" + +LEGACY_DIR=${MENUTESTDIR}/legacy_applnk +export LEGACY_DIR + +# 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> + <!-- Search the default locations --> + <DefaultAppDirs/> + <DefaultDirectoryDirs/> + <LegacyDir>${LEGACY_DIR}</LegacyDir> + + <Menu> + <Name>Development</Name> + <Include> + <Filename>kate.desktop</Filename> + </Include> + </Menu> + <Menu> + <Name>Development</Name> + <Include> + <Filename>KEdit.desktop</Filename> + </Include> + <Deleted/> + </Menu> + <Menu> + <Name>Editors</Name> + <Include> + <Filename>kwrite.desktop</Filename> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files + +installData ${LEGACY_DIR}/Development gideon-legacy.desktop +installData ${XDG_DATA_DIR}/applications kate.desktop kwrite.desktop KEdit.desktop |