summaryrefslogtreecommitdiffstats
path: root/menu
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2005-02-18 16:27:54 +0000
committerMark McLoughlin <mark@skynet.ie>2005-02-18 16:27:54 +0000
commit84abdf7c07f88c4249c7be93b95775fd26ead257 (patch)
tree4e75c5c786efea954341f39260c95b2c8386656a /menu
parentf48caff725f8b1c13ec2b4018d9e8d3409a89d12 (diff)
downloadxdg-specs-84abdf7c07f88c4249c7be93b95775fd26ead257.tar.xz
test that
2005-02-18 Mark McLoughlin <mark@skynet.ie> * tests/o/result, tests/o/test: test that <And><Category>foo</Category><Not><Category>foo</Category></Not></And> doesn't match anything. * README: add bit about how to test the GNOME impl.
Diffstat (limited to 'menu')
-rw-r--r--menu/tests/ChangeLog9
-rw-r--r--menu/tests/README3
-rw-r--r--menu/tests/tests/o/result3
-rw-r--r--menu/tests/tests/o/test33
4 files changed, 48 insertions, 0 deletions
diff --git a/menu/tests/ChangeLog b/menu/tests/ChangeLog
index 8b6d258..7abae7a 100644
--- a/menu/tests/ChangeLog
+++ b/menu/tests/ChangeLog
@@ -1,5 +1,14 @@
2005-02-18 Mark McLoughlin <mark@skynet.ie>
+ * tests/o/result,
+ tests/o/test: test that
+ <And><Category>foo</Category><Not><Category>foo</Category></Not></And>
+ doesn't match anything.
+
+ * README: add bit about how to test the GNOME impl.
+
+2005-02-18 Mark McLoughlin <mark@skynet.ie>
+
Problem pointed out by Waldo.
* menutest: don't try and run the "CVS" test :)
diff --git a/menu/tests/README b/menu/tests/README
index e3a4fd8..edda7ce 100644
--- a/menu/tests/README
+++ b/menu/tests/README
@@ -25,6 +25,9 @@ able to generate the menu in the above format.
To test KDE one can use:
MENUTEST="kbuildsycoca --menutest"
+With GNOME, you can use:
+ MENUTEST=gnome-menu-spec-test
+
The menutest script should be used to run the tests. The following commands can
be used:
diff --git a/menu/tests/tests/o/result b/menu/tests/tests/o/result
new file mode 100644
index 0000000..446f6b6
--- /dev/null
+++ b/menu/tests/tests/o/result
@@ -0,0 +1,3 @@
+Apps/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop
+Apps/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop
+Apps/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop
diff --git a/menu/tests/tests/o/test b/menu/tests/tests/o/test
new file mode 100644
index 0000000..93afee5
--- /dev/null
+++ b/menu/tests/tests/o/test
@@ -0,0 +1,33 @@
+echo ">>> <And><Category>foo</Category><Not><Category>foo</Category></Not></And> shouldn't match anything"
+
+# 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>Applications</Name>
+ <Directory>apps.directory</Directory>
+ <Include>
+ <Or>
+ <Category>TextEditor</Category>
+ <And>
+ <Category>Game</Category>
+ <Not><Category>Game</Category></Not>
+ </And>
+ </Or>
+ </Include>
+ </Menu>
+</Menu>
+EOF
+
+# Install .desktop files
+installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop kate.desktop freecell.desktop
+installData ${XDG_DATA_DIR}/desktop-directories apps.directory