<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #copied {background-color:#ccccff;}
  tr.alt #copied {background-color:#bbbbf7;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas</tt></b></td></tr>
<tr><td><tt><a href="#file1"><span id="added">ActionScriptProjectTest.java</span></a></tt> </td><td></td><td align="right" id="added">+42</td><td></td><td nowrap="nowrap" align="right">added 412</td></tr>
</table>
<pre class="comment">
test case for the bug reported earlier by Billy Wang
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added">metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas</span><br />
<div class="fileheader" id="added"><big><b>ActionScriptProjectTest.java</b></big> <small id="info">added at 412</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/java/uk/co/badgersinfoil/metaas/ActionScriptProjectTest.java        2007-02-13 16:31:18 UTC (rev 411)
+++ trunk/src/test/java/uk/co/badgersinfoil/metaas/ActionScriptProjectTest.java        2007-02-13 22:59:41 UTC (rev 412)
@@ -0,0 +1,42 @@
</small></pre><pre class="diff" id="added">+package uk.co.badgersinfoil.metaas;
+
+import java.io.File;
+import java.io.IOException;
+import uk.co.badgersinfoil.metaas.dom.ASClassType;
+import uk.co.badgersinfoil.metaas.dom.ASCompilationUnit;
+import uk.co.badgersinfoil.metaas.dom.ASMethod;
+import uk.co.badgersinfoil.metaas.dom.Visibility;
+import junit.framework.TestCase;
+
+
+public class ActionScriptProjectTest extends TestCase {
+        private File tmpDir;
+
+        public void setUp() throws IOException {
+                tmpDir = new File(System.getProperty("java.io.tmpdir"), "metaas-test");
+                tmpDir.mkdir();
+        }
+
+        public void tearDown() {
+                // delete files (assumes no subdirs created),
+                File[] files = tmpDir.listFiles();
+                for (int i=0; i&lt;files.length; i++) {
+                        files[i].delete();
+                }
+                // delete the folder itself,
+                tmpDir.delete();
+        }
+
+        public void testIt() throws IOException {
+                ActionScriptFactory fact = new ActionScriptFactory();
+                ActionScriptProject proj = fact.newEmptyASProject(tmpDir.getPath());
+                ASCompilationUnit unit = proj.newClass("Test");
+                ASClassType clazz = (ASClassType)unit.getType();
+                ASMethod meth = clazz.newMethod("test", Visibility.PUBLIC, "void");
+                meth.addStmt("trace('Hello world')");
+                proj.writeAll();
+                
+                File expected = new File(tmpDir, "Test.as");
+                assertTrue(expected.exists());
+        }
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.12</small></center>
</body></html>