summaryrefslogtreecommitdiffstats
path: root/menu/tests
diff options
context:
space:
mode:
authorWaldo Bastian <waldo.bastian@intel.com>2005-03-22 20:49:21 +0000
committerWaldo Bastian <waldo.bastian@intel.com>2005-03-22 20:49:21 +0000
commited47fd4b1c2bb86864c3ddd0439c39892e64858c (patch)
tree9782209ffb5e3548903bc1bd46173b3bab3d4f00 /menu/tests
parent2403355e486ac6bc972fd150d38e3c44d086960a (diff)
downloadxdg-specs-ed47fd4b1c2bb86864c3ddd0439c39892e64858c.tar.xz
Test for type attribute in <MergeFile>
Diffstat (limited to 'menu/tests')
-rw-r--r--menu/tests/tests/q/result5
-rw-r--r--menu/tests/tests/q/test60
-rw-r--r--menu/tests/tests/r/result5
-rw-r--r--menu/tests/tests/r/test60
4 files changed, 130 insertions, 0 deletions
diff --git a/menu/tests/tests/q/result b/menu/tests/tests/q/result
new file mode 100644
index 0000000..de216fc
--- /dev/null
+++ b/menu/tests/tests/q/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/q/test b/menu/tests/tests/q/test
new file mode 100644
index 0000000..67f092a
--- /dev/null
+++ b/menu/tests/tests/q/test
@@ -0,0 +1,60 @@
+echo ">>> the <MergeFile> tag ..."
+
+# Tests the type attribute in <MergeFile>
+
+# Generate applications.menu
+mkdir -p ${XDG_CONFIG_HOME}/menus
+./expand > ${XDG_CONFIG_HOME}/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 type="parent">${XDG_CONFIG_DIR}/menus/test.menu</MergeFile>
+
+ <Menu>
+ <Name>Applications</Name>
+ <Include>
+ <Category>TextEditor</Category>
+ </Include>
+ </Menu>
+</Menu>
+EOF
+
+
+mkdir -p ${XDG_CONFIG_DIR}/menus
+./expand > ${XDG_CONFIG_DIR}/menus/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>Games</Name>
+ <Include>
+ <Category>Game</Category>
+ </Include>
+ </Menu>
+</Menu>
+EOF
+
+./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>
+
+ <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 freecell.desktop glines.desktop
diff --git a/menu/tests/tests/r/result b/menu/tests/tests/r/result
new file mode 100644
index 0000000..489b7f4
--- /dev/null
+++ b/menu/tests/tests/r/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
+Games/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop
+Games/ glines.desktop /tmp/menutestdir/xdg_data_dir/applications/glines.desktop
diff --git a/menu/tests/tests/r/test b/menu/tests/tests/r/test
new file mode 100644
index 0000000..b6d2dbc
--- /dev/null
+++ b/menu/tests/tests/r/test
@@ -0,0 +1,60 @@
+echo ">>> the <MergeFile> tag ..."
+
+# Tests the type attribute in <MergeFile>
+
+# Generate applications.menu
+mkdir -p ${XDG_CONFIG_HOME}/menus
+./expand > ${XDG_CONFIG_HOME}/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 type="path">${XDG_CONFIG_DIR}/menus/test.menu</MergeFile>
+
+ <Menu>
+ <Name>Applications</Name>
+ <Include>
+ <Category>TextEditor</Category>
+ </Include>
+ </Menu>
+</Menu>
+EOF
+
+
+mkdir -p ${XDG_CONFIG_DIR}/menus
+./expand > ${XDG_CONFIG_DIR}/menus/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>Games</Name>
+ <Include>
+ <Category>Game</Category>
+ </Include>
+ </Menu>
+</Menu>
+EOF
+
+./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>
+
+ <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 freecell.desktop glines.desktop