summaryrefslogtreecommitdiff
path: root/tests/setup_desktop_test
blob: 40acf6f9e2f83d866c8fbe7414ab62c11eff7055 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env atf-sh

. $(atf_get_srcdir)/test_env.sh
init_tests \
	setup_desktop_usage \
	setup_desktop_unsupported \
	setup_desktop_xfce \
	setup_desktop_gnome \
	setup_desktop_plasma

setup_desktop_usage_body() {
	test_usage setup-desktop
}

setup_desktop_unsupported_body() {
	init_env
	atf_check -s exit:1 \
		-o empty \
		-e match:"usage" \
		setup-desktop blah
}

setup_desktop_xfce_body() {
	init_env
	atf_check -s exit:0 \
		-o match:"apk add.*xfce4" \
		-o match:"Starting udev" \
		-e match:"WARNING: You need to create a user account" \
		setup-desktop xfce
}

setup_desktop_gnome_body() {
	init_env
	atf_check -s exit:0 \
		-o match:"apk add.*gnome" \
		-o match:"Starting udev" \
		-e match:"WARNING: You need to create a user account" \
		setup-desktop gnome
}

setup_desktop_plasma_body() {
	init_env
	atf_check -s exit:0 \
		-o match:"apk add.*plasma-desktop" \
		-o match:"Starting udev" \
		-e match:"WARNING: You need to create a user account" \
		setup-desktop plasma
}