From ad7546fb9f20de7c728a878b9d3bd9d3b05e8906 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 7 Sep 2022 21:57:16 -0700 Subject: [PATCH] tailcfg: fix broken test from comment change Fix broken build from 255c0472fb0f5c13c40b90eb9da87337da312e63 "Oh, that's safe to commit because most tests are passing and it's just a comment change!", I thought, forgetting I'd added a test that parses its comments. Change-Id: Iae93d595e06fec48831215a98adbb270f3bfda05 Signed-off-by: Brad Fitzpatrick --- tailcfg/tailcfg_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailcfg/tailcfg_test.go b/tailcfg/tailcfg_test.go index 27cbb23f0..8f13c9f20 100644 --- a/tailcfg/tailcfg_test.go +++ b/tailcfg/tailcfg_test.go @@ -661,7 +661,7 @@ func TestRegisterRequestNilClone(t *testing.T) { // We've screwed this up several times. func TestCurrentCapabilityVersion(t *testing.T) { f := must.Get(os.ReadFile("tailcfg.go")) - matches := regexp.MustCompile(`(?m)^//\s+(\d+): \d\d\d\d-\d\d-\d\d: `).FindAllStringSubmatch(string(f), -1) + matches := regexp.MustCompile(`(?m)^//[\s-]+(\d+): \d\d\d\d-\d\d-\d\d: `).FindAllStringSubmatch(string(f), -1) max := 0 for _, m := range matches { n := must.Get(strconv.Atoi(m[1]))