From 53eaec0c50cf58f69310da7db4daf9a2343c9701 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},