(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestGoAWK_SplitPattern(t *testing.T) { |
| 69 | // Pattern: f[a-z]x matches "fox", "fax", "fix" |
| 70 | pattern := `f[a-z]x` |
| 71 | input := goawkSplitInput |
| 72 | |
| 73 | reCoregex := coregex.MustCompile(pattern) |
| 74 | reStdlib := regexp.MustCompile(pattern) |
| 75 | |
| 76 | // Test Split |
| 77 | splitCoregex := reCoregex.Split(input, -1) |
| 78 | splitStdlib := reStdlib.Split(input, -1) |
| 79 | |
| 80 | if len(splitCoregex) != len(splitStdlib) { |
| 81 | t.Errorf("Split count mismatch: coregex=%d, stdlib=%d", len(splitCoregex), len(splitStdlib)) |
| 82 | } |
| 83 | |
| 84 | for i := range splitCoregex { |
| 85 | if i < len(splitStdlib) && splitCoregex[i] != splitStdlib[i] { |
| 86 | t.Errorf("Split[%d] mismatch: coregex=%q, stdlib=%q", i, splitCoregex[i], splitStdlib[i]) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // Test FindAllString |
| 91 | allCoregex := reCoregex.FindAllString(input, -1) |
| 92 | allStdlib := reStdlib.FindAllString(input, -1) |
| 93 | |
| 94 | if len(allCoregex) != len(allStdlib) { |
| 95 | t.Errorf("FindAllString count mismatch: coregex=%d, stdlib=%d", len(allCoregex), len(allStdlib)) |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | func TestGoAWK_SubPattern(t *testing.T) { |
| 100 | // Pattern: f[a-z]x for replacement |
nothing calls this directly
no test coverage detected