summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlanius <lanius>2005-06-02 14:28:56 +0000
committerlanius <lanius>2005-06-02 14:28:56 +0000
commit44b05b809c562f45b517da0f02d8c60b98f63810 (patch)
tree9299d50a3f1a345a52a52138c039dbec23783413
parent41a83b38b76c86e24c32868b816955375840f614 (diff)
downloadxdg-specs-44b05b809c562f45b517da0f02d8c60b98f63810.tar.xz
two more tests
-rw-r--r--menu/tests/tests/x/result1
-rw-r--r--menu/tests/tests/x/test31
-rw-r--r--menu/tests/tests/y/result1
-rw-r--r--menu/tests/tests/y/test45
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