mirror of
https://github.com/google/nomulus
synced 2026-09-06 16:17:13 +00:00
Fix unicode issue in GetTldCommand (#2108)
This commit is contained in:
@@ -80,11 +80,12 @@ public abstract class CommandTestCase<C extends Command> {
|
||||
RegistryToolEnvironment.UNITTEST.setup(systemPropertyExtension);
|
||||
command = newCommandInstance();
|
||||
|
||||
// Capture standard output/error.
|
||||
// Capture standard output/error. Use a single-byte encoding to emulate platforms where default
|
||||
// charset is not UTF_8.
|
||||
oldStdout = System.out;
|
||||
System.setOut(new PrintStream(new OutputSplitter(System.out, stdout)));
|
||||
System.setOut(new PrintStream(new OutputSplitter(System.out, stdout), false, "US-ASCII"));
|
||||
oldStderr = System.err;
|
||||
System.setErr(new PrintStream(new OutputSplitter(System.err, stderr)));
|
||||
System.setErr(new PrintStream(new OutputSplitter(System.err, stderr), false, "US-ASCII"));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
|
||||
@@ -20,14 +20,11 @@ import static google.registry.testing.TestDataHelper.loadFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import com.beust.jcommander.ParameterException;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link GetTldCommand}. */
|
||||
class GetTldCommandTest extends CommandTestCase<GetTldCommand> {
|
||||
|
||||
// TODO (sarahbot): re-enable this test after we figure out why it fails during RC build.
|
||||
@Disabled
|
||||
@Test
|
||||
void testSuccess() throws Exception {
|
||||
createTld("xn--q9jyb4c");
|
||||
|
||||
Reference in New Issue
Block a user