Merge branch 'master' into release

This commit is contained in:
Jesse McConnell 2012-05-22 13:59:02 -05:00
commit bbe7b4b67c
1 changed files with 11 additions and 1 deletions

View File

@ -24,11 +24,15 @@ import java.io.FilenameFilter;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.sql.Time;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.TimeZone;
import java.util.zip.ZipFile;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.toolchain.test.OS;
import org.eclipse.jetty.util.IO;
import org.junit.BeforeClass;
@ -317,8 +321,14 @@ public class ResourceTest
throws Exception
{
String s = "jar:"+__userURL+"TestData/test.zip!/subdir/numbers";
// TODO move this into src/test/resources!!!
ZipFile zf = new ZipFile(MavenTestingUtils.getProjectFile("src/test/java/org/eclipse/jetty/util/resource/TestData/test.zip"));
long last = zf.getEntry("subdir/numbers").getTime();
Resource r = Resource.newResource(s);
assertEquals(971425252000L,r.lastModified()); // Known date value inside zip
assertEquals(last,r.lastModified()); // Known date value inside zip
}
/* ------------------------------------------------------------ */