Browse Source

remove tabs

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@924683 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
724299a142
1 changed files with 26 additions and 26 deletions
  1. +26
    -26
      src/tests/junit/org/apache/tools/ant/taskdefs/email/MessageTest.java

+ 26
- 26
src/tests/junit/org/apache/tools/ant/taskdefs/email/MessageTest.java View File

@@ -29,34 +29,34 @@ import org.apache.tools.ant.Project;
import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.util.FileUtils;


public class MessageTest extends TestCase { public class MessageTest extends TestCase {
private File f = new File(System.getProperty("java.io.tmpdir"),
"message.txt");
private File f = new File(System.getProperty("java.io.tmpdir"),
"message.txt");
/** /**
* test for bugzilla 48932 * test for bugzilla 48932
*/ */
public void testPrintStreamDoesNotGetClosed() {
Message ms = new Message();
Project p = new Project();
ms.setProject(p);
ms.addText("hi, this is an email");
FileOutputStream fis = null;
try {
fis = new FileOutputStream(f);
ms.print(new PrintStream(fis));
fis.write(120);
} catch (IOException ioe) {
fail("we should not have issues writing after having called Message.print");
} finally {
FileUtils.close(fis);
}
}
public void tearDown() {
if (f.exists()) {
FileUtils fu = FileUtils.getFileUtils();
fu.tryHardToDelete(f);
}
}
public void testPrintStreamDoesNotGetClosed() {
Message ms = new Message();
Project p = new Project();
ms.setProject(p);
ms.addText("hi, this is an email");
FileOutputStream fis = null;
try {
fis = new FileOutputStream(f);
ms.print(new PrintStream(fis));
fis.write(120);
} catch (IOException ioe) {
fail("we should not have issues writing after having called Message.print");
} finally {
FileUtils.close(fis);
}
}
public void tearDown() {
if (f.exists()) {
FileUtils fu = FileUtils.getFileUtils();
fu.tryHardToDelete(f);
}
}


} }

Loading…
Cancel
Save