summaryrefslogtreecommitdiffstats
path: root/menu/tests/tests/Directory/test
blob: fe7e126f7faa15dbe7004e511770e59bb2425a91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
TEST_PURPOSE="<Directory> tag ..."

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>
	<!-- Search the default locations -->
	<DefaultAppDirs/>
	<DefaultDirectoryDirs/>

	<Menu>
		<Name>Applications</Name>
		<Directory>apps.directory</Directory>
		<Include>
			<Category>TextEditor</Category>
		</Include>
	</Menu>
</Menu>
EOF

	# Install .desktop files
	installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop
	installData ${XDG_DATA_DIR}/desktop-directories apps.directory
}