Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend: SpecialColor translation #2854

Merged
merged 23 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add some regex tests
  • Loading branch information
CalMWolfs committed Nov 22, 2024
commit 25f3537d4de7155dc4d9eed069c26f3ac3ea038c
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,28 @@ object MinionFeatures {
private var coinsPerDay = ""

private val patternGroup = RepoPattern.group("minion")

/**
* REGEX-TEST: §aYou have upgraded your Minion to Tier V
*/
private val minionUpgradePattern by patternGroup.pattern(
"chat.upgrade",
"§aYou have upgraded your Minion to Tier (?<tier>.*)",
)

/**
* REGEX-TEST: §aYou received §r§64 coins§r§a!
* REGEX-TEST: §aYou received §r§610.5 coins§r§a!
*/
private val minionCoinPattern by patternGroup.pattern(
"chat.coin",
"§aYou received §r§6.* coins§r§a!",
)

/**
* REGEX-TEST: Redstone Minion IV
* REGEX-TEST: Chicken Minion XI
*/
private val minionTitlePattern by patternGroup.pattern(
"title",
"Minion [^➜]",
Expand Down
3 changes: 0 additions & 3 deletions versions/1.8.9/detekt/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,6 @@
<ID>RepoPatternRegexTest:MaxwellAPI.kt$MaxwellAPI$by patternGroup.pattern( "gui.noselectedpower", "(?:§.)*Visit Maxwell in the Hub to learn", )</ID>
<ID>RepoPatternRegexTest:MaxwellAPI.kt$MaxwellAPI$by patternGroup.pattern( "gui.thaumaturgy.data", "§(?&lt;color&gt;.)\\+(?&lt;amount&gt;[^ ]+)(?&lt;icon&gt;.) (?&lt;name&gt;.+)", )</ID>
<ID>RepoPatternRegexTest:MinionCraftHelper.kt$MinionCraftHelper$by RepoPattern.pattern( "bingo.minion.name", "(?&lt;name&gt;.*) Minion (?&lt;number&gt;.*)" )</ID>
<ID>RepoPatternRegexTest:MinionFeatures.kt$MinionFeatures$by patternGroup.pattern( "chat.coin", "§aYou received §r§6.* coins§r§a!", )</ID>
<ID>RepoPatternRegexTest:MinionFeatures.kt$MinionFeatures$by patternGroup.pattern( "chat.upgrade", "§aYou have upgraded your Minion to Tier (?&lt;tier&gt;.*)", )</ID>
<ID>RepoPatternRegexTest:MinionFeatures.kt$MinionFeatures$by patternGroup.pattern( "title", "Minion [^➜]", )</ID>
<ID>RepoPatternRegexTest:MobFilter.kt$MobFilter$by repoGroup.pattern( "filter.dojo", "^(?:(?&lt;points&gt;\\d+) pts|(?&lt;empty&gt;\\w+))$", )</ID>
<ID>RepoPatternRegexTest:MobFilter.kt$MobFilter$by repoGroup.pattern( "filter.summon", "^(?&lt;owner&gt;\\w+)'s (?&lt;name&gt;.*) \\d+.*", )</ID>
<ID>RepoPatternRegexTest:MobFilter.kt$MobFilter$by repoGroup.pattern( "jerry", "(?:\\[\\w+(?&lt;level&gt;\\d+)\\] )?(?&lt;owner&gt;\\w+)'s (?&lt;name&gt;\\w+ Jerry) \\d+ Hits", )</ID>
Expand Down
Loading