mirror of https://github.com/apache/jclouds.git
Using OS-dependent file separators in asserts (instead of assuming UNIX '/')
This commit is contained in:
parent
0e06eedcdb
commit
39dbc592b5
|
@ -18,8 +18,11 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.compute.callables;
|
package org.jclouds.compute.callables;
|
||||||
|
|
||||||
|
import static java.lang.String.format;
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
|
@ -42,7 +45,7 @@ public class InitScriptConfigurationForTasksTest {
|
||||||
public void testPatternUpdatesBasedir() {
|
public void testPatternUpdatesBasedir() {
|
||||||
InitScriptConfigurationForTasks config = InitScriptConfigurationForTasks.create();
|
InitScriptConfigurationForTasks config = InitScriptConfigurationForTasks.create();
|
||||||
config.initScriptPattern("/var/foo-init-%s");
|
config.initScriptPattern("/var/foo-init-%s");
|
||||||
assertEquals(config.getBasedir(), "/var");
|
assertEquals(config.getBasedir(), format("%svar", File.separator));
|
||||||
assertEquals(config.getInitScriptPattern(), "/var/foo-init-%s");
|
assertEquals(config.getInitScriptPattern(), "/var/foo-init-%s");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +60,7 @@ public class InitScriptConfigurationForTasksTest {
|
||||||
|
|
||||||
}).getInstance(InitScriptConfigurationForTasks.class);
|
}).getInstance(InitScriptConfigurationForTasks.class);
|
||||||
config.initScriptPattern("/var/foo-init-%s");
|
config.initScriptPattern("/var/foo-init-%s");
|
||||||
assertEquals(config.getBasedir(), "/var");
|
assertEquals(config.getBasedir(), format("%svar", File.separator));
|
||||||
assertEquals(config.getInitScriptPattern(), "/var/foo-init-%s");
|
assertEquals(config.getInitScriptPattern(), "/var/foo-init-%s");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue