mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-11 22:45:38 -04:00
Fix locale-dependent code in GameTest (#4451)
Co-authored-by: modmuss <modmuss50@gmail.com>
This commit is contained in:
parent
fd5bf1a075
commit
cb3258dead
2 changed files with 4 additions and 2 deletions
fabric-client-gametest-api-v1/src/client/java/net/fabricmc/fabric/impl/client/gametest/context
fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/impl/gametest
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
|||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
@ -427,7 +428,7 @@ public final class ClientGameTestContextImpl implements ClientGameTestContext {
|
|||
throw new AssertionError("Failed to create screenshots directory", e);
|
||||
}
|
||||
|
||||
String counterPrefix = options.counterPrefix ? "%04d_".formatted(screenshotCounter++) : "";
|
||||
String counterPrefix = options.counterPrefix ? String.format(Locale.ROOT, "%04d_", screenshotCounter++) : "";
|
||||
Path screenshotFile = destinationDir.resolve(counterPrefix + fileName + ".png");
|
||||
|
||||
try {
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.lang.reflect.Method;
|
|||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
@ -150,7 +151,7 @@ final class TestAnnotationLocator {
|
|||
}
|
||||
|
||||
private static String camelToSnake(String input) {
|
||||
return input.replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase();
|
||||
return input.replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase(Locale.ROOT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue