name_test.go 440 B

1234567891011121314151617181920
  1. // Copyright 2015 Daniel Theophanes.
  2. // Use of this source code is governed by a zlib-style
  3. // license that can be found in the LICENSE file.
  4. package service
  5. import (
  6. "runtime"
  7. "strings"
  8. "testing"
  9. )
  10. func TestPlatformName(t *testing.T) {
  11. got := Platform()
  12. t.Logf("Platform is %v", got)
  13. wantPrefix := runtime.GOOS + "-"
  14. if !strings.HasPrefix(got, wantPrefix) {
  15. t.Errorf("Platform() want: /^%s.*$/, got: %s", wantPrefix, got)
  16. }
  17. }