2015-01-13 21:54:35 -08:00
|
|
|
// Copyright 2015 Daniel Theophanes.
|
|
|
|
|
// Use of this source code is governed by a zlib-style
|
2015-09-01 09:34:29 -07:00
|
|
|
// license that can be found in the LICENSE file.
|
2015-01-13 21:54:35 -08:00
|
|
|
|
2014-10-29 09:05:24 -07:00
|
|
|
package service
|
|
|
|
|
|
|
|
|
|
import (
|
2016-07-05 14:53:08 +01:00
|
|
|
"runtime"
|
|
|
|
|
"strings"
|
2014-10-29 09:05:24 -07:00
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestPlatformName(t *testing.T) {
|
2016-07-05 14:53:08 +01:00
|
|
|
got := Platform()
|
|
|
|
|
t.Logf("Platform is %v", got)
|
|
|
|
|
wantPrefix := runtime.GOOS + "-"
|
|
|
|
|
if !strings.HasPrefix(got, wantPrefix) {
|
|
|
|
|
t.Errorf("Platform() want: /^%s.*$/, got: %s", wantPrefix, got)
|
|
|
|
|
}
|
2014-10-29 09:05:24 -07:00
|
|
|
}
|