From 121be82375b70cfd5474eb334acc97b8d3405f7a Mon Sep 17 00:00:00 2001 From: Hariom Verma Date: Wed, 2 Aug 2023 03:13:17 +0800 Subject: [PATCH] Add test for invalid char --- gnovm/pkg/gnomod/gnomod_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnovm/pkg/gnomod/gnomod_test.go b/gnovm/pkg/gnomod/gnomod_test.go index f4ec932823f..fc483f75c97 100644 --- a/gnovm/pkg/gnomod/gnomod_test.go +++ b/gnovm/pkg/gnomod/gnomod_test.go @@ -27,6 +27,16 @@ func TestCreateGnoModFile(t *testing.T) { desc: "empty directory (without modPath)", errShouldContain: "cannot determine package name", }, + { + desc: "invalid modPath 1", + inModPath: " ", + errShouldContain: "malformed import path", + }, + { + desc: "invalid modPath 2", + inModPath: "\"", + errShouldContain: "malformed import path", + }, { desc: "valid package", in: []struct{ filename, content string }{