Diff

Differences From Artifact [eebf67dde7]:

To Artifact [496af272f1]:


72
73
74
75
76
77
78










	if n, r := s("aa"); !n.Matched || n.Content != "aa" || n.Nodes != nil || r != "" {
		t.Error("Invalid result for String match test", n)
	}
	if n, r := s("ab"); n.Matched || n.Content != "" || n.Nodes == nil || r != "ab" {
		t.Error("Invalid result for String no-match test", n, r, len(r))
	}
}

















>
>
>
>
>
>
>
>
>
>
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
	if n, r := s("aa"); !n.Matched || n.Content != "aa" || n.Nodes != nil || r != "" {
		t.Error("Invalid result for String match test", n)
	}
	if n, r := s("ab"); n.Matched || n.Content != "" || n.Nodes == nil || r != "ab" {
		t.Error("Invalid result for String no-match test", n, r, len(r))
	}
}

func TestDigit(t *testing.T) {
	d := Digit()
	if n, r := d("a"); n.Matched || n.Content != "" || n.Nodes == nil || r != "a" {
		t.Error("Invalid result for Digit no-match test", n)
	}
	if n, r := d("1"); !n.Matched || n.Content != "1" || n.Nodes != nil || r != "" {
		t.Error("Invalid result for Digit match test", n)
	}
}