You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/07/25 14:09:40 UTC
[GitHub] [maven-shared-utils] kwin commented on a diff in pull request #106: [MSHARED-1109] Ignore MessageUtilsTest methods on unsupported platforms
kwin commented on code in PR #106:
URL: https://github.com/apache/maven-shared-utils/pull/106#discussion_r928930229
##########
src/test/java/org/apache/maven/shared/utils/logging/MessageUtilsTest.java:
##########
@@ -46,12 +47,19 @@ public void testSystem()
{
MessageUtils.systemInstall();
assertThat( System.out, not( sameInstance( currentOut ) ) );
- MessageUtils.systemUninstall();
assertThat( System.out, sameInstance( currentOut ) );
}
+ catch(LinkageError e)
Review Comment:
done
##########
src/test/java/org/apache/maven/shared/utils/logging/MessageUtilsTest.java:
##########
@@ -46,12 +47,19 @@ public void testSystem()
{
MessageUtils.systemInstall();
assertThat( System.out, not( sameInstance( currentOut ) ) );
- MessageUtils.systemUninstall();
assertThat( System.out, sameInstance( currentOut ) );
}
+ catch(LinkageError e)
+ {
+ assumeNoException( "JAnsi not supported for this platform", e );
+ }
finally
{
- System.setOut( currentOut );
+ try {
+ MessageUtils.systemUninstall();
+ } catch (Throwable t) {
Review Comment:
done
##########
src/test/java/org/apache/maven/shared/utils/logging/MessageUtilsTest.java:
##########
@@ -69,9 +77,23 @@ public int getTerminalWidth()
AnsiOutputStream aos = new AnsiOutputStream( new ByteArrayOutputStream(), width, AnsiMode.Default,
null, AnsiType.Emulation, AnsiColors.Colors256, StandardCharsets.UTF_8,
null, null, false );
- AnsiConsole.systemInstall();
- AnsiConsole.out = new AnsiPrintStream( aos, true );
- assertEquals( 33, MessageUtils.getTerminalWidth() );
- AnsiConsole.systemUninstall();
+ try
+ {
+ AnsiConsole.systemInstall();
+ AnsiConsole.out = new AnsiPrintStream( aos, true );
+ assertEquals( 33, MessageUtils.getTerminalWidth() );
+ }
+ catch(LinkageError e)
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org