summaryrefslogtreecommitdiff
path: root/tests/setup_keymap_test
blob: 44c16432e2da5f203cf3d0082ad7272f647c64d1 (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
#!/usr/bin/env atf-sh

init_env() {
	PATH=$(atf_get_srcdir)/..:$PATH
	export ROOT=$PWD LIBDIR=$(atf_get_srcdir)/.. MOCK=echo
}

# docs:
# - https://github.com/jmmv/kyua/wiki/Quickstart-atf-sh-test
# - https://manned.org/atf-sh-api

atf_init_test_cases() {
	atf_add_test_case setup_keymap_usage
}

atf_test_case setup_keymap_usage
setup_keymap_usage_body() {
	init_env
	atf_check -s exit:0 \
		-o match:'^usage: setup-keymap' \
		-e empty \
		setup-keymap -h
}