TEST_PURPOSE="<And><Category>foo</Category><Not><Category>foo</Category></Not></And> shouldn't match anything"

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>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
	installData ${XDG_DATA_DIR}/applications/test freecell.desktop
	installData ${XDG_DATA_DIR}/desktop-directories apps.directory
}
