X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1e4630ddb8015d72978aae1be334cce2f8ca20d4..e0d89f524f6ebdb5dc730402ff3c61e6d8160c9e:/sdk/go/arvados/duration_test.go diff --git a/sdk/go/arvados/duration_test.go b/sdk/go/arvados/duration_test.go index 86fe218c33..6a198e6940 100644 --- a/sdk/go/arvados/duration_test.go +++ b/sdk/go/arvados/duration_test.go @@ -50,13 +50,13 @@ func (s *DurationSuite) TestUnmarshalJSON(c *check.C) { D Duration } err := json.Unmarshal([]byte(`{"D":1.234}`), &d) - c.Check(err, check.ErrorMatches, `missing unit in duration 1.234`) + c.Check(err, check.ErrorMatches, `.*missing unit in duration "?1\.234"?`) err = json.Unmarshal([]byte(`{"D":"1.234"}`), &d) - c.Check(err, check.ErrorMatches, `.*missing unit in duration 1.234`) + c.Check(err, check.ErrorMatches, `.*missing unit in duration "?1\.234"?`) err = json.Unmarshal([]byte(`{"D":"1"}`), &d) - c.Check(err, check.ErrorMatches, `.*missing unit in duration 1`) + c.Check(err, check.ErrorMatches, `.*missing unit in duration "?1"?`) err = json.Unmarshal([]byte(`{"D":"foobar"}`), &d) - c.Check(err, check.ErrorMatches, `.*invalid duration foobar`) + c.Check(err, check.ErrorMatches, `.*invalid duration "?foobar"?`) err = json.Unmarshal([]byte(`{"D":"60s"}`), &d) c.Check(err, check.IsNil) c.Check(d.D.Duration(), check.Equals, time.Minute)