summaryrefslogtreecommitdiff
path: root/test/lib-conf-test.sh
blob: bb6b285cbca4100c9267008048ae53b1f4ae7a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env roundup

describe lib/conf.sh

before() {
	tmpdir=$(mktemp -d --tmpdir test-conf.sh.XXXXXXXXXXXX)
	stat=0
}

after() {
	rm -rf -- "$tmpdir" "$XDG_CACHE_HOME" "$XDG_CONFIG_HOME"
}


it_sets_makepkg_vars_in_custom_file() {
	unset PKGDEST
	touch "$tmpdir/makepkg.conf"
	. $(librelib conf.sh)
	MAKEPKG_CONF="$tmpdir/makepkg.conf" set_conf_makepkg PKGDEST /pkgdest
	.  "$tmpdir/makepkg.conf"
	[[ $PKGDEST == /pkgdest ]]
}