From 8fbe3dc1784bb7e2da40061b68a2ba949e6f1600 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 1 Mar 2020 21:41:20 +0100 Subject: [PATCH] test regex for builtin string typecheck --- typecheck/builtin/string_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/typecheck/builtin/string_test.go b/typecheck/builtin/string_test.go index 048485b..d23b7bf 100644 --- a/typecheck/builtin/string_test.go +++ b/typecheck/builtin/string_test.go @@ -41,6 +41,18 @@ func TestString_AvailableTypes(t *testing.T) { {"string(1 )", false}, {"string( 1 )", false}, + {"string()", false}, + {"string(a)", false}, + {"string(-1)", false}, + + {"string(,)", false}, + {"string(1,b)", false}, + {"string(a,b)", false}, + {"string(a,1)", false}, + {"string(-1,1)", false}, + {"string(1,-1)", false}, + {"string(-1,-1)", false}, + {"string(1,2)", true}, {"string(1, 2)", true}, {"string(1, 2)", false},