Skip to content

Commit f3cee43

Browse files
author
Igor Polevoy
authored
Merge pull request #799 from cschabl/bugfix-798-RuntimeUtilSpec
#798: skip RuntimeUtilSpec on Windows
2 parents 5c6fa02 + 15f7cc2 commit f3cee43

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

javalite-common/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,11 @@
100100
<artifactId>log4j</artifactId>
101101
</dependency>
102102

103+
<dependency>
104+
<groupId>org.apache.commons</groupId>
105+
<artifactId>commons-lang3</artifactId>
106+
<version>3.8.1</version>
107+
<scope>test</scope>
108+
</dependency>
103109
</dependencies>
104110
</project>

javalite-common/src/test/java/org/javalite/common/RuntimeUtilSpec.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package org.javalite.common;
22

3+
import org.apache.commons.lang3.SystemUtils;
34
import org.junit.Test;
45

56
import static org.javalite.common.RuntimeUtil.execute;
67
import static org.javalite.test.jspec.JSpec.the;
8+
import static org.junit.Assume.assumeFalse;
79

810
/**
911
* @author igor on 9/23/18.
@@ -12,21 +14,29 @@ public class RuntimeUtilSpec {
1214

1315
@Test
1416
public void shouldUseDefaultBufferSize(){
17+
assumeFalse(SystemUtils.IS_OS_WINDOWS);
18+
1519
the(execute("ls -ls").out).shouldContain("pom.xml");
1620
}
1721

1822
@Test
1923
public void shouldUseDefaultBufferSizeSplitArguments(){
24+
assumeFalse(SystemUtils.IS_OS_WINDOWS);
25+
2026
the(execute("ls", "-ls").out).shouldContain("pom.xml");
2127
}
2228

2329
@Test
2430
public void shouldOverrideBufferSize(){
31+
assumeFalse(SystemUtils.IS_OS_WINDOWS);
32+
2533
the(execute(4096, "ls", "-ls").out).shouldContain("pom.xml");
2634
}
2735

2836
@Test
2937
public void shouldOverrideBufferSizeSplitArguments(){
38+
assumeFalse(SystemUtils.IS_OS_WINDOWS);
39+
3040
the(execute(4096, "ls -ls").out).shouldContain("pom.xml");
3141
}
3242
}

0 commit comments

Comments
 (0)