Fix test again
This commit is contained in:
@@ -101,21 +101,21 @@ func TestIndexExplosions_ShouldNotPanic(t *testing.T) {
|
||||
}
|
||||
|
||||
p := &processor.RegexProcessor{}
|
||||
actual, mods, matches, err := p.ProcessContent(string(given), `LightComponent!anyrange="(!num)"`, "*4")
|
||||
result, mods, matches, err := p.ProcessContent(string(given), `(?-s)LightComponent!anyrange="(!num)"`, "*4")
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Error processing content: %v", err)
|
||||
}
|
||||
|
||||
if matches != 1 {
|
||||
t.Errorf("Expected 1 match, got %d", matches)
|
||||
if matches != 45 {
|
||||
t.Errorf("Expected 45 match, got %d", matches)
|
||||
}
|
||||
|
||||
if mods != 1 {
|
||||
t.Errorf("Expected 1 modification, got %d", mods)
|
||||
if mods != 45 {
|
||||
t.Errorf("Expected 45 modification, got %d", mods)
|
||||
}
|
||||
|
||||
if string(actual) != string(expected) {
|
||||
t.Errorf("expected %s, got %s", expected, actual)
|
||||
if string(result) != string(expected) {
|
||||
t.Errorf("expected %s, got %s", expected, result)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user