summaryrefslogtreecommitdiffstats
path: root/menu/tests/tests/NoDisplay/test
diff options
context:
space:
mode:
Diffstat (limited to 'menu/tests/tests/NoDisplay/test')
-rw-r--r--menu/tests/tests/NoDisplay/test37
1 files changed, 37 insertions, 0 deletions
diff --git a/menu/tests/tests/NoDisplay/test b/menu/tests/tests/NoDisplay/test
new file mode 100644
index 0000000..48e94ea
--- /dev/null
+++ b/menu/tests/tests/NoDisplay/test
@@ -0,0 +1,37 @@
+TEST_PURPOSE="NoDisplay desktop entry values"
+
+test_code() {
+ # 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>hidden.directory</Directory>
+ <Include>
+ <Category>TextEditor</Category>
+ </Include>
+ </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 hidden.directory
+}