summaryrefslogtreecommitdiffstats
path: root/menu
diff options
context:
space:
mode:
Diffstat (limited to 'menu')
-rw-r--r--menu/tests/tests/n/result4
-rw-r--r--menu/tests/tests/n/test36
2 files changed, 40 insertions, 0 deletions
diff --git a/menu/tests/tests/n/result b/menu/tests/tests/n/result
new file mode 100644
index 0000000..82b7efb
--- /dev/null
+++ b/menu/tests/tests/n/result
@@ -0,0 +1,4 @@
+Other/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop
+Other/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop
+Other/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop
+Other/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop
diff --git a/menu/tests/tests/n/test b/menu/tests/tests/n/test
new file mode 100644
index 0000000..18fa630
--- /dev/null
+++ b/menu/tests/tests/n/test
@@ -0,0 +1,36 @@
+echo ">>> Allocation of desktop entry values from deleted menus"
+
+# 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/>
+ <DefaultDirectoryDirs/>
+
+ <Menu>
+ <Name>Shouldn't see this</Name>
+ <Directory>apps.directory</Directory>
+ <Include>
+ <Category>TextEditor</Category>
+ </Include>
+ <Deleted/>
+ </Menu>
+
+ <Menu>
+ <Name>Other</Name>
+ <OnlyUnallocated/>
+ <Include>
+ <All/>
+ </Include>
+ </Menu>
+</Menu>
+EOF
+
+# Install .desktop files
+installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop kate.desktop freecell.desktop hidden.desktop
+installData ${XDG_DATA_DIR}/desktop-directories apps.directory