mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Either string quotation or Go formatting has since changed. Will investigate later, but this fixes the dashboard for now. Change-Id: Ieab3800fc2c24ba86026d25dea12853131c04948 Reviewed-on: https://go-review.googlesource.com/118715 Reviewed-by: Robert Griesemer <gri@golang.org>
34 lines
678 B
Go
34 lines
678 B
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//+build go1.10
|
|
|
|
package static
|
|
|
|
import (
|
|
"bytes"
|
|
"io/ioutil"
|
|
"testing"
|
|
)
|
|
|
|
func TestStaticIsUpToDate(t *testing.T) {
|
|
oldBuf, err := ioutil.ReadFile("static.go")
|
|
if err != nil {
|
|
t.Errorf("error while reading static.go: %v\n", err)
|
|
}
|
|
|
|
newBuf, err := Generate()
|
|
if err != nil {
|
|
t.Errorf("error while generating static.go: %v\n", err)
|
|
}
|
|
|
|
if bytes.Compare(oldBuf, newBuf) != 0 {
|
|
t.Error(`static.go is stale. Run:
|
|
$ go generate golang.org/x/tools/godoc/static
|
|
$ git diff
|
|
to see the differences.`)
|
|
|
|
}
|
|
}
|