Add missing test from jetty-7
This commit is contained in:
parent
fef74963af
commit
83ce567e66
|
@ -87,6 +87,24 @@ public class WebAppContextTest
|
|||
assertTrue(Arrays.equals(configs,wac.getConfigurations()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRealPathDoesNotExist() throws Exception
|
||||
{
|
||||
Server server = new Server(0);
|
||||
WebAppContext context = new WebAppContext(".", "/");
|
||||
server.setHandler(context);
|
||||
server.start();
|
||||
|
||||
// When
|
||||
ServletContext ctx = context.getServletContext();
|
||||
|
||||
// Then
|
||||
// This passes:
|
||||
assertNotNull(ctx.getRealPath("/doesnotexist"));
|
||||
// This fails:
|
||||
assertNotNull(ctx.getRealPath("/doesnotexist/"));
|
||||
}
|
||||
|
||||
/**
|
||||
* tests that the servlet context white list works
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue