1 46 47 package groovy.lang; 48 49 import org.codehaus.groovy.classgen.TestSupport; 50 51 55 public class ScriptPrintTest extends TestSupport { 56 57 public void testScriptWithCustomPrintln() throws Exception { 58 assertScript( 59 "out = new MockWriter(); println(); assert out.output == 'println()', 'value of output is: ' + out.output\n" 60 + "print('hey'); assert out.output == 'print(hey)' , 'value is: ' + out.output\n" 61 + "println('hey'); assert out.output == 'println(hey)', 'value is: ' + out.output\n"); 62 } 63 64 } 65 | Popular Tags |