diff options
Diffstat (limited to 'libgo/go/runtime/runtime_test.go')
-rw-r--r-- | libgo/go/runtime/runtime_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/go/runtime/runtime_test.go b/libgo/go/runtime/runtime_test.go index 2ea2dc22b6f..1f403a17056 100644 --- a/libgo/go/runtime/runtime_test.go +++ b/libgo/go/runtime/runtime_test.go @@ -8,6 +8,7 @@ import ( "io" . "runtime" "runtime/debug" + "strings" "testing" "unsafe" ) @@ -331,3 +332,11 @@ func TestGoroutineProfileTrivial(t *testing.T) { } } } + +func TestVersion(t *testing.T) { + // Test that version does not contain \r or \n. + vers := Version() + if strings.Contains(vers, "\r") || strings.Contains(vers, "\n") { + t.Fatalf("cr/nl in version: %q", vers) + } +} |