diff options
author | Rob Pike <r@golang.org> | 2010-01-13 14:39:30 +1100 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2010-01-13 14:39:30 +1100 |
commit | e26ee9df08c24af564d849d23b9f70644e7b9329 (patch) | |
tree | d20051c465bf10922fa38402bf5b2da91fbc3a7e /src/pkg/time/time_test.go | |
parent | b006b3690903f289f7240153cefcb0077b3199f2 (diff) | |
download | golang-e26ee9df08c24af564d849d23b9f70644e7b9329.tar.gz |
don't worry about the number of spaces when parsing.
allow an underscore to stand for a space or digit if the following number is >=10.
R=rsc
CC=golang-dev
http://codereview.appspot.com/186115
Diffstat (limited to 'src/pkg/time/time_test.go')
-rw-r--r-- | src/pkg/time/time_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/time/time_test.go b/src/pkg/time/time_test.go index dab6d2073..5036ceb13 100644 --- a/src/pkg/time/time_test.go +++ b/src/pkg/time/time_test.go @@ -165,6 +165,9 @@ var parseTests = []ParseTest{ ParseTest{"RFC850", RFC850, "Thursday, 04-Feb-10 21:00:57 PST", true, true}, ParseTest{"RFC1123", RFC1123, "Thu, 04 Feb 2010 21:00:57 PST", true, true}, ParseTest{"ISO8601", ISO8601, "2010-02-04T21:00:57-0800", true, false}, + // Amount of white space should not matter. + ParseTest{"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true}, + ParseTest{"ANSIC", ANSIC, "Thu Feb 4 21:00:57 2010", false, true}, } func TestParse(t *testing.T) { |