Fix #4706: don't replace ampersands when loading from plain text (#4734)

* Fix #4706: Exit linting early if a card with the exact name is found first

* Remove ampersand conversion

* put back

* Update tests

* Format

* don't use qsizetype

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
Zach H 2023-01-29 15:37:28 -08:00 committed by GitHub
parent 42d1d66d9b
commit 4c290aec57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 24 deletions

View file

@ -127,9 +127,10 @@ TEST(LoadingFromClipboardTest, EdgeCaseTesting)
//(test) Æ | / (3)
// Mainboard (10 cards)
// Mainboard (11 cards)
Æther Adept
2x Fire & Ice
2x Fire // Ice
1 Minsc & Boo, Timeless Heroes
3 Pain/Suffering
4X [B] Forest (3)
@ -145,7 +146,11 @@ TEST(LoadingFromClipboardTest, EdgeCaseTesting)
)");
Result result("DeckName", "Comment 1\n\nComment [two]\n(test) Æ | / (3)",
{{"Aether Adept", 1}, {"Fire // Ice", 2}, {"Pain // Suffering", 3}, {"Forest", 4}},
{{"Aether Adept", 1},
{"Fire // Ice", 2},
{"Minsc & Boo, Timeless Heroes", 1},
{"Pain // Suffering", 3},
{"Forest", 4}},
{{"Nature's Resurgence", 5}, {"Gaea's Skyfolk", 6}, {"B.F.M. (Big Furry Monster)", 7}});
testDeck(clipboard, result);
}