2020-02-06 18:59:18 -05:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load test_helper
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
f test/var/db/repos/gentoo/app-backup/mkstage4/ebuild
|
2023-05-23 19:06:43 -04:00
|
|
|
f test/var/db/repos/science/sci-biology/fsl/ebuild
|
2020-02-06 18:59:18 -05:00
|
|
|
f test/var/cache/distfiles/mkstage4.tar.gz
|
|
|
|
f test/usr/portage/Manifest
|
|
|
|
mkstage4.sh -q -t test test
|
|
|
|
}
|
|
|
|
|
|
|
|
teardown() {
|
2023-05-23 19:07:51 -04:00
|
|
|
rm -rf test test.tar.bz2
|
2023-05-23 19:06:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "/var/db/repos/gentoo/ is included" {
|
|
|
|
assert_tar_includes test/var/db/repos/gentoo/
|
2020-02-06 18:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "/var/db/repos/gentoo/app-backup is excluded" {
|
2023-05-23 19:06:43 -04:00
|
|
|
assert_tar_excludes_partial test/var/db/repos/gentoo/app-backup
|
2020-02-06 18:59:18 -05:00
|
|
|
}
|
|
|
|
|
2023-05-23 19:06:43 -04:00
|
|
|
@test "/var/db/repos/science/ is included" {
|
2020-02-06 18:59:18 -05:00
|
|
|
assert_tar_includes test/var/db/repos/gentoo/
|
|
|
|
}
|
|
|
|
|
2023-05-23 19:06:43 -04:00
|
|
|
@test "/var/db/repos/science/sci-biology is excluded" {
|
|
|
|
assert_tar_excludes_partial test/var/db/repos/gentoo/app-backup
|
|
|
|
}
|
|
|
|
|
2020-02-06 18:59:18 -05:00
|
|
|
@test "/var/cache/distfiles/mkstage4.tar.gz is excluded" {
|
|
|
|
assert_tar_excludes test/var/cache/distfiles/mkstage4.tar.gz
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "/var/cache/distfiles/ is included" {
|
|
|
|
assert_tar_includes test/var/cache/distfiles/
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "/usr/portage/Manifest is excluded" {
|
|
|
|
assert_tar_excludes test/usr/portage/Manifest
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "/usr/portage/ is included" {
|
|
|
|
assert_tar_includes test/usr/portage/
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim: ft=bash
|