Fix tests with expected output
This commit is contained in:
@@ -79,15 +79,16 @@ public class ScriptDrivenTest extends TestCase {
|
|||||||
private String getExpectedOutput(final String name) throws IOException,
|
private String getExpectedOutput(final String name) throws IOException,
|
||||||
InterruptedException {
|
InterruptedException {
|
||||||
String expectedOutputName = basedir+"/"+name+"-expected.out";
|
String expectedOutputName = basedir+"/"+name+"-expected.out";
|
||||||
InputStream is = getClass().getResourceAsStream(expectedOutputName);
|
File file = new File( expectedOutputName );
|
||||||
if (is != null) {
|
if ( file.exists() ) {
|
||||||
|
InputStream is = new FileInputStream(file);
|
||||||
try {
|
try {
|
||||||
return readString(is);
|
return readString(is);
|
||||||
} finally {
|
} finally {
|
||||||
is.close();
|
is.close();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
File file = new File(basedir+"/"+name+".lua");
|
file = new File(basedir+"/"+name+".lua");
|
||||||
if ( !file.exists() )
|
if ( !file.exists() )
|
||||||
fail("Could not load script for test case: " + name);
|
fail("Could not load script for test case: " + name);
|
||||||
InputStream script = new FileInputStream(file);
|
InputStream script = new FileInputStream(file);
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
120
|
|
||||||
120
|
|
||||||
1.2246467991473532E-16
|
|
||||||
1.2246467991473532E-16
|
|
||||||
Reference in New Issue
Block a user