Example #1
0
 public void OneLineCommand()
 {
     String oneLineString = "one line\n*end";
     StringReader reader = new StringReader(oneLineString);
     command = new InputCommand(reader);
     Assert.AreEqual(1, command.CleanLines().Count);
     Assert.AreEqual(8, command.SelectionStart());
 }
Example #2
0
 public void EmptyCommand()
 {
     command = new InputCommand(new StringReader(""));
     Assert.AreEqual(0, command.CleanLines().Count);
 }
Example #3
0
 public void OneDirtyLine()
 {
     command = new InputCommand(new StringReader("a|b\n*end"));
     Assert.AreEqual("ab", command.CleanLines()[0]);
     Assert.AreEqual(1, command.SelectionStart());
 }
Example #4
0
 private void SetInput(StringReader reader)
 {
     InputCommand input = new InputCommand(reader);
     form.TextModel.Lines = input.CleanLines();
     form.TextModel.SelectionStart = input.SelectionStart();
     form.PutText(null, (String[]) form.TextModel.Lines.ToArray(typeof(String)), form.TextModel.SelectionStart);
 }