diff --git a/tests/cross-compile.bats b/tests/cross-compile.bats index 2f145b6..0e43e7f 100644 --- a/tests/cross-compile.bats +++ b/tests/cross-compile.bats @@ -1,23 +1,31 @@ #!/usr/bin/env bats -load './test_helpers/bats-support/load' -load './test_helpers/bats-assert/load' +load 'test_helpers/bats-support/load' +load 'test_helpers/bats-assert/load' -@test "clean out any cross compiled binaries" { +@test "test cross compilation command lifecycle" { run make clean assert_success assert_output --partial 'rm -vRf ./builds/ahoy-bin-*' -} -@test "cross compile binaries with make" { + run ls ./builds/ahoy-* + assert_failure + assert_output --partial 'No such file' + run make cross assert_success assert_output --partial 'mv ./builds/ahoy-bin-windows-amd64 ./builds/ahoy-bin-windows-amd64.exe; mv ./builds/ahoy-bin-windows-arm64 ./builds/ahoy-bin-windows-arm64.exe;' -} -@test "check cross compiled binaries exist" { run ls ./builds/ahoy-* assert_output --partial 'ahoy-bin-darwin-amd64' assert_output --partial 'ahoy-bin-linux-arm64' assert_output --partial 'ahoy-bin-windows-amd64.exe' + + run make clean + assert_success + assert_output --partial 'rm -vRf ./builds/ahoy-bin-*' + + run ls ./builds/ahoy-* + assert_failure + assert_output --partial 'No such file' }