// print_test // David A. Mellis // 1 August 2005 // Basic test of EditorConsole's handling of print() and println() boolean first_time; void setup() { first_time = true; } void draw() { // we only want to do this once, but we need to put it in // draw() to use delay(). we need delay() because the console // is updated in batches, and we need to check the behavior // both within and across batches. if (first_time) { first_time = false; for (int i = 0; i < 65000; i++) print("X"); println(); println("there should be line breaks after every N of the 'X's."); // these two tests should span batch boundaries, but that // shouldn't affect the output. for (int i = 0; i < 15; i++) { println("line " + i); delay(50); } for (int i = 0; i < 15; i++) { print("word" + i + " "); delay(50); } println(); println("foo\nbar"); println("empty.."); println(); println("..line"); println("two..\n\n\n..empty lines"); System.err.println("this is red"); println("this is white"); print("(this should all "); println("be on one line)"); print("(and this should be "); print("on the "); println("next)"); print("lastly"); } }