Archived
1
0

feat: add test for get_nfpm_arch

This commit is contained in:
Joe Previte
2021-09-16 16:19:10 -07:00
parent 0609a1b2bd
commit 6a692487c8
4 changed files with 52 additions and 22 deletions

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bats
SCRIPT_NAME="build-lib.sh"
SCRIPT="$BATS_TEST_DIRNAME/../../ci/build/$SCRIPT_NAME"
source "$SCRIPT"
@test "get_nfpm_arch should return armhfp for rpm on armv7l" {
run get_nfpm_arch rpm armv7l
[ "$output" = "armhfp" ]
}
@test "get_nfpm_arch should return armhf for deb on armv7l" {
run get_nfpm_arch deb armv7l
[ "$output" = "armhf" ]
}
@test "get_nfpm_arch should return arch if no arch override exists " {
run get_nfpm_arch deb i386
[ "$output" = "i386" ]
}