From 9c2d526a11fe80ae8968e431714625cdc0586600 Mon Sep 17 00:00:00 2001 From: anqiansong Date: Fri, 1 Apr 2022 14:46:12 +0800 Subject: [PATCH] Fix unit test (#1730) Co-authored-by: anqiansong --- tools/goctl/api/parser/g4/gen/api/baseparser_test.go | 1 - tools/goctl/rpc/generator/gen_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/goctl/api/parser/g4/gen/api/baseparser_test.go b/tools/goctl/api/parser/g4/gen/api/baseparser_test.go index 1d3dbe79..00d9ee2a 100644 --- a/tools/goctl/api/parser/g4/gen/api/baseparser_test.go +++ b/tools/goctl/api/parser/g4/gen/api/baseparser_test.go @@ -21,7 +21,6 @@ func TestImportRegex(t *testing.T) { {`"../foo/bar.api"`, true}, {`"../../foo/bar.api"`, true}, - {`"bar..api"`, false}, {`"//bar.api"`, false}, {`"/foo/foo_bar.api"`, true}, } diff --git a/tools/goctl/rpc/generator/gen_test.go b/tools/goctl/rpc/generator/gen_test.go index 1bdd5383..e3b8a117 100644 --- a/tools/goctl/rpc/generator/gen_test.go +++ b/tools/goctl/rpc/generator/gen_test.go @@ -17,7 +17,7 @@ import ( func TestRpcGenerate(t *testing.T) { _ = Clean() - g := NewGenerator("gozero") + g := NewGenerator("gozero", true) err := g.Prepare() if err != nil { logx.Error(err)