summaryrefslogtreecommitdiffstats
path: root/menu/tests
diff options
context:
space:
mode:
authorWaldo Bastian <waldo.bastian@intel.com>2003-11-21 12:47:46 +0000
committerWaldo Bastian <waldo.bastian@intel.com>2003-11-21 12:47:46 +0000
commit5bd07a319c23b3643551b121d6616ebf3a103509 (patch)
tree894c7e9dc6bfcc7b14132cb63a22966f7d5728e5 /menu/tests
parentb0a665efde552fc14ea6dca56374db9da81a8e31 (diff)
downloadxdg-specs-5bd07a319c23b3643551b121d6616ebf3a103509.tar.xz
Test for relative file handling of <MergeFile>
Diffstat (limited to 'menu/tests')
-rw-r--r--menu/tests/tests/l/result5
-rw-r--r--menu/tests/tests/l/test56
2 files changed, 61 insertions, 0 deletions
diff --git a/menu/tests/tests/l/result b/menu/tests/tests/l/result
new file mode 100644
index 0000000..de216fc
--- /dev/null
+++ b/menu/tests/tests/l/result
@@ -0,0 +1,5 @@
+Applications/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop
+Applications/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop
+Applications/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop
+Development/ kbabel.desktop /tmp/menutestdir/xdg_data_dir/applications/kbabel.desktop
+Development/ quanta.desktop /tmp/menutestdir/xdg_data_dir/applications/quanta.desktop
diff --git a/menu/tests/tests/l/test b/menu/tests/tests/l/test
new file mode 100644
index 0000000..9846196
--- /dev/null
+++ b/menu/tests/tests/l/test
@@ -0,0 +1,56 @@
+echo ">>> the <MergeFile> tag ..."
+
+# 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