Modified TestUtil not to prepend 'rsrc' to test resource file paths

because it's silly. Prepend your own damned 'rsrc' if you want to look in
that directory.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@510 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2001-12-13 01:31:23 +00:00
parent 2df834bc75
commit ae224c6252
6 changed files with 23 additions and 31 deletions
@@ -1,5 +1,5 @@
//
// $Id: SiteResourceLoaderTest.java,v 1.3 2001/11/08 01:57:18 mdb Exp $
// $Id: SiteResourceLoaderTest.java,v 1.4 2001/12/13 01:31:23 mdb Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -56,7 +56,7 @@ public class SiteResourceLoaderTest extends TestCase
// now create a resource loader and load up some resources
SiteResourceLoader loader = new SiteResourceLoader(
ident, TestUtil.getResourcePath("servlet/srl"));
ident, TestUtil.getResourcePath("rsrc/servlet/srl"));
try {
testResourceLoader(SiteIdentifier.DEFAULT_SITE_ID,
@@ -80,7 +80,7 @@ public class SiteResourceLoaderTest extends TestCase
appendResource(siteId, gen, loader, "/footer.txt");
StringBuffer cmp = new StringBuffer();
compareFile = "servlet/srl/" + compareFile;
compareFile = "rsrc/servlet/srl/" + compareFile;
InputStream cin = TestUtil.getResourceAsStream(compareFile);
if (cin == null) {
throw new IOException("Unable to load " + compareFile);
@@ -110,7 +110,7 @@ public class SiteResourceLoaderTest extends TestCase
if (rin == null) {
// fall back to the "default" resource if we couldn't load a
// site-specific version
String rpath = "servlet/srl/default/" + path;
String rpath = "rsrc/servlet/srl/default/" + path;
rpath = TestUtil.getResourcePath(rpath);
rin = new FileInputStream(rpath);
}
@@ -1,5 +1,5 @@
//
// $Id: HashIntMapTest.java,v 1.1 2001/11/26 19:34:31 mdb Exp $
// $Id: HashIntMapTest.java,v 1.2 2001/12/13 01:31:23 mdb Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -26,7 +26,6 @@ import junit.framework.Test;
import junit.framework.TestCase;
import com.samskivert.Log;
import com.samskivert.test.TestUtil;
public class HashIntMapTest extends TestCase
{
@@ -1,5 +1,5 @@
//
// $Id: IntListUtilTest.java,v 1.1 2001/11/06 02:13:29 mdb Exp $
// $Id: IntListUtilTest.java,v 1.2 2001/12/13 01:31:23 mdb Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -24,7 +24,6 @@ import junit.framework.Test;
import junit.framework.TestCase;
import com.samskivert.Log;
import com.samskivert.test.TestUtil;
public class IntListUtilTest extends TestCase
{
@@ -1,5 +1,5 @@
//
// $Id: SetFieldRuleTest.java,v 1.1 2001/11/17 03:45:52 mdb Exp $
// $Id: SetFieldRuleTest.java,v 1.2 2001/12/13 01:31:23 mdb Exp $
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne
@@ -78,7 +78,8 @@ public class SetFieldRuleTest extends TestCase
new SetFieldRule(digester, "stringArrayField"));
try {
String xmlpath = TestUtil.getResourcePath("xml/setfieldtest.xml");
String xmlpath =
TestUtil.getResourcePath("rsrc/xml/setfieldtest.xml");
InputStream input = new FileInputStream(xmlpath);
digester.parse(input);
input.close();