mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
Tests: add new verify test to check wrong symbols in rules/names;
This commit is contained in:
parent
fc8c7eb410
commit
ed8c3276e1
1 changed files with 14 additions and 1 deletions
|
@ -401,7 +401,7 @@ public class VerifyCardDataTest {
|
||||||
doubleNames.put(card.getName(), count + 1);
|
doubleNames.put(card.getName(), count + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check
|
// check double names
|
||||||
for (ExpansionSet.SetCardInfo card : set.getSetCardInfo()) {
|
for (ExpansionSet.SetCardInfo card : set.getSetCardInfo()) {
|
||||||
boolean cardHaveDoubleName = (doubleNames.getOrDefault(card.getName(), 0) > 1);
|
boolean cardHaveDoubleName = (doubleNames.getOrDefault(card.getName(), 0) > 1);
|
||||||
boolean cardHaveVariousSetting = card.getGraphicInfo() != null && card.getGraphicInfo().getUsesVariousArt();
|
boolean cardHaveVariousSetting = card.getGraphicInfo() != null && card.getGraphicInfo().getUsesVariousArt();
|
||||||
|
@ -624,6 +624,7 @@ public class VerifyCardDataTest {
|
||||||
//checkNumbers(card, ref); // TODO: load data from allsets.json and check it (allcards.json do not have card numbers)
|
//checkNumbers(card, ref); // TODO: load data from allsets.json and check it (allcards.json do not have card numbers)
|
||||||
checkBasicLands(card, ref);
|
checkBasicLands(card, ref);
|
||||||
checkMissingAbilities(card, ref);
|
checkMissingAbilities(card, ref);
|
||||||
|
checkWrongSymbolsInRules(card);
|
||||||
checkWrongAbilitiesText(card, ref);
|
checkWrongAbilitiesText(card, ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -728,6 +729,18 @@ public class VerifyCardDataTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkWrongSymbolsInRules(Card card) {
|
||||||
|
if (card.getName().contains("’")) {
|
||||||
|
fail(card, "card name", "card's names contains restricted symbol ’");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String rule : card.getRules()) {
|
||||||
|
if (rule.contains("’")) {
|
||||||
|
fail(card, "rules", "card's rules contains restricted symbol ’");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void checkLegalityFormats(Card card, JsonCard ref) {
|
private void checkLegalityFormats(Card card, JsonCard ref) {
|
||||||
if (skipListHaveName("LEGALITY", card.getExpansionSetCode(), card.getName())) {
|
if (skipListHaveName("LEGALITY", card.getExpansionSetCode(), card.getName())) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue