Fix overlapping capture groups
This commit is contained in:
@@ -3,6 +3,7 @@ package regression
|
||||
import (
|
||||
"modify/processor"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -83,13 +84,18 @@ func TestTalentsMechanicOutOfRange(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIndexExplosions(t *testing.T) {
|
||||
given, err := os.ReadFile("testfiles/OutpostItems.xml")
|
||||
func TestIndexExplosions_ShouldNotPanic(t *testing.T) {
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
t.Fatalf("Error getting current working directory: %v", err)
|
||||
}
|
||||
|
||||
given, err := os.ReadFile(filepath.Join(cwd, "..", "testfiles", "OutpostItems.xml"))
|
||||
if err != nil {
|
||||
t.Fatalf("Error reading file: %v", err)
|
||||
}
|
||||
|
||||
expected, err := os.ReadFile("testfiles/OutpostItemsExpected.xml")
|
||||
expected, err := os.ReadFile(filepath.Join(cwd, "..", "testfiles", "OutpostItemsExpected.xml"))
|
||||
if err != nil {
|
||||
t.Fatalf("Error reading file: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user