Added more tests
This commit is contained in:
		| @@ -460,6 +460,11 @@ var reTests = []struct { | ||||
| 	{`\x00ff`, nil, "\u00ff", []Group{}}, | ||||
| 	{`\x{0000ff}`, nil, "\u00ff", []Group{{0, 1}}}, | ||||
| 	{`\x{0000FF}`, nil, "\u00ff", []Group{{0, 1}}}, | ||||
| 	{"\t\n\v\r\f\a", nil, "\t\n\v\r\f\a", []Group{{0, 6}}}, | ||||
| 	{`\t\n\v\r\f\a`, nil, "\t\n\v\r\f\a", []Group{{0, 6}}}, | ||||
| 	{`[\t][\n][\v][\r][\f][\b]`, nil, "\t\n\v\r\f\b", []Group{{0, 6}}}, | ||||
| 	{`.*d`, nil, "abc\nabd", []Group{{4, 7}}}, | ||||
| 	{`(`, nil, "-", nil}, | ||||
|  | ||||
| 	// Todo - add numeric range tests | ||||
| } | ||||
| @@ -606,6 +611,7 @@ var groupTests = []struct { | ||||
|  | ||||
| 	{`([\s]*)([\S]*)([\s]*)`, nil, ` testing!1972`, []Match{[]Group{{0, 13}, {0, 1}, {1, 13}, {13, 13}}, []Group{{13, 13}, {13, 13}, {13, 13}, {13, 13}}}}, | ||||
| 	{`(\s*)(\S*)(\s*)`, nil, ` testing!1972`, []Match{[]Group{{0, 13}, {0, 1}, {1, 13}, {13, 13}}, []Group{{13, 13}, {13, 13}, {13, 13}, {13, 13}}}}, | ||||
| 	{`(([a-z]+):)?([a-z]+)$`, nil, `smil`, []Match{[]Group{{0, 4}, {-1, -1}, {-1, -1}, {0, 4}}}}, | ||||
| } | ||||
|  | ||||
| func TestFindAllMatches(t *testing.T) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user