Skip to content

Commit

Permalink
#175 win test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 27, 2023
1 parent 221a9dd commit fae1141
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/test/java/com/jcabi/log/FileDecorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
Expand All @@ -51,13 +52,23 @@
final class FileDecorTest {

@Test
void simplyWorks() {
@DisabledOnOs(OS.WINDOWS)
void simplyWorksOnUnix() {
MatcherAssert.assertThat(
new Printed(new FileDecor("/tmp/test-me.txt"), 0, 0, 0).toString(),
Matchers.endsWith("test-me.txt")
);
}

@Test
@EnabledOnOs(OS.WINDOWS)
void simplyWorksOnWindows() {
MatcherAssert.assertThat(
new Printed(new FileDecor("D:\\a\\b\\foo.txt"), 0, 0, 0).toString(),
Matchers.endsWith("foo.txt")
);
}

@DisabledOnOs(OS.WINDOWS)
@ParameterizedTest
@MethodSource("params")
Expand Down

0 comments on commit fae1141

Please sign in to comment.