This commit is contained in:
parent
a35f1ba735
commit
8ec1a1a971
|
|
@ -332,6 +332,11 @@ public class Checker extends AutomaticBean implements MessageDispatcher
|
|||
*/
|
||||
public String normalize(String aPath)
|
||||
{
|
||||
|
||||
if (aPath == null) {
|
||||
return aPath;
|
||||
}
|
||||
|
||||
final String osName = System.getProperty("os.name").toLowerCase(
|
||||
Locale.US);
|
||||
final boolean onNetWare = (osName.indexOf("netware") > -1);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package com.puppycrawl.tools.checkstyle;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
|
@ -30,6 +31,17 @@ import org.junit.Test;
|
|||
|
||||
public class CheckerTest
|
||||
{
|
||||
|
||||
@Test
|
||||
public void testNullBasedir() throws Exception
|
||||
{
|
||||
final Checker c = new Checker();
|
||||
|
||||
c.setBasedir("c:/a\\b/./c\\..\\d");
|
||||
c.setBasedir(null);
|
||||
assertNull(c.getBasedir());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDosBasedir() throws Exception
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue