package org.ngrinder.common.util;

import org.junit.Test;

import static org.fest.assertions.Assertions.assertThat;


public class PathUtilsTest {
	@Test
	public void testJoin() throws Exception {
		assertThat(PathUtils.join("/hello/world", "wow")).isEqualTo("/hello/world/wow");
		assertThat(PathUtils.join("/hello/world", "wow/")).isEqualTo("/hello/world/wow");
		assertThat(PathUtils.join("/hello/world//", "wow/")).isEqualTo("/hello/world/wow");
		assertThat(PathUtils.join("/hello/world////", "//wow/")).isEqualTo("/hello/world/wow");
		assertThat(PathUtils.join("/////hello/world////", "//wow/")).isEqualTo("/hello/world/wow");
		assertThat(PathUtils.join("hello/world////", "//wow/")).isEqualTo("/hello/world/wow");
		assertThat(PathUtils.join("hello/world////", "//wow/")).isEqualTo("/hello/world/wow");
		assertThat(PathUtils.join("/hello/world////", "//wow////")).isEqualTo("/hello/world/wow");
	}
}

@@ -245,33 +245,32 @@
 w%22)).isEqualTo(%22
-/
 hello/world/wow%22
@@ -328,33 +328,32 @@
 /%22)).isEqualTo(%22
-/
 hello/world/wow%22
@@ -413,33 +413,32 @@
 /%22)).isEqualTo(%22
-/
 hello/world/wow%22
@@ -502,33 +502,32 @@
 /%22)).isEqualTo(%22
-/
 hello/world/wow%22
@@ -595,33 +595,32 @@
 /%22)).isEqualTo(%22
-/
 hello/world/wow%22
@@ -683,33 +683,32 @@
 /%22)).isEqualTo(%22
-/
 hello/world/wow%22
@@ -771,33 +771,32 @@
 /%22)).isEqualTo(%22
-/
 hello/world/wow%22
@@ -871,17 +871,16 @@
 qualTo(%22
-/
 hello/wo

Fix a bug