1 52 53 package freemarker.testcase; 54 55 import freemarker.template.TemplateException; 56 import java.io.IOException ; 57 58 59 64 public class TestImport extends AbstractTestCase { 65 66 public TestImport(String aTestname) { 67 super( aTestname ); 68 } 69 70 73 public void setUp() { 74 setUpFiles( "test-import.txt" ); 75 } 76 77 public void runTest() throws TemplateException, IOException { 78 config.addAutoImport("my", "test-import_lib.txt"); 79 try { 80 super.runTest(); 81 } 82 finally { 83 config.removeAutoImport("my"); 84 } 85 } 86 87 88 90 public static void main( String [] argc ) throws Exception { 91 AbstractTestCase cTest = new TestImport( "test-import.txt" ); 92 cTest.run(); 93 } 94 } | Popular Tags |