Fix tests with expected output

This commit is contained in:
James Roseborough
2008-07-23 13:47:15 +00:00
parent 81223754f2
commit 887658ae7b
2 changed files with 4 additions and 7 deletions

View File

@@ -79,15 +79,16 @@ public class ScriptDrivenTest extends TestCase {
private String getExpectedOutput(final String name) throws IOException,
InterruptedException {
String expectedOutputName = basedir+"/"+name+"-expected.out";
InputStream is = getClass().getResourceAsStream(expectedOutputName);
if (is != null) {
File file = new File( expectedOutputName );
if ( file.exists() ) {
InputStream is = new FileInputStream(file);
try {
return readString(is);
} finally {
is.close();
}
} else {
File file = new File(basedir+"/"+name+".lua");
file = new File(basedir+"/"+name+".lua");
if ( !file.exists() )
fail("Could not load script for test case: " + name);
InputStream script = new FileInputStream(file);

View File

@@ -1,4 +0,0 @@
120
120
1.2246467991473532E-16
1.2246467991473532E-16