tests: improved verify ability texts to better support anchor words

This commit is contained in:
Oleg Agafonov 2025-04-23 05:02:51 +04:00
parent 9b34c322b5
commit c6858085b6

View file

@ -2567,6 +2567,9 @@ public class VerifyCardDataTest {
// becomes "Swampcycling {2}\nMountaincycling {2}" // becomes "Swampcycling {2}\nMountaincycling {2}"
refText = splitCyclingAbilities(refText); refText = splitCyclingAbilities(refText);
// ref text can contain dirty spaces after some text remove/fix, example: anchor words in Struggle for Project Purity
refText = refText.replaceAll(" +", " ");
String[] refRules = refText.split("[\\$\\\n]"); // ref card's abilities can be splited by \n or $ chars String[] refRules = refText.split("[\\$\\\n]"); // ref card's abilities can be splited by \n or $ chars
for (int i = 0; i < refRules.length; i++) { for (int i = 0; i < refRules.length; i++) {
refRules[i] = prepareRule(card.getName(), refRules[i]); refRules[i] = prepareRule(card.getName(), refRules[i]);