build_test.go 364 B

1234567891011121314151617181920212223
  1. package main
  2. import (
  3. "os"
  4. "testing"
  5. "github.com/v2ray/v2ray-core/testing/unit"
  6. )
  7. func TestBuildMacOS(t *testing.T) {
  8. assert := unit.Assert(t)
  9. targetFile := os.ExpandEnv("$GOPATH/bin/v2ray-macos.zip")
  10. os.Remove(targetFile)
  11. *targetOS = "macos"
  12. *targetArch = "amd64"
  13. *archive = true
  14. main()
  15. _, err := os.Stat(targetFile)
  16. assert.Error(err).IsNil()
  17. }