public void ProcessDoubleBang() { Loader loader = new Loader(new StringReader("!!new! !!new"), new VmCompiler()); Assert.AreEqual("!new", loader.GetBlockText()); Assert.AreEqual(" !new", loader.GetBlockText()); Assert.IsNull(loader.GetBlockText()); }
public void GetTwoLinesBlock() { Loader loader = new Loader(new StringReader("line 1\r\nline 2\r\n!"), new VmCompiler()); Assert.IsNotNull(loader); Assert.AreEqual("line 1\r\nline 2\r\n", loader.GetBlockText()); Assert.IsNull(loader.GetBlockText()); }
public void GetSpaceLine() { Loader loader = new Loader(new StringReader(" \n"), new VmCompiler()); Assert.AreEqual(" \r\n", loader.GetBlockText()); Assert.IsNull(loader.GetBlockText()); }
public void GetEmptyLine() { Loader loader = new Loader(new StringReader("\n"), new VmCompiler()); Assert.IsNull(loader.GetBlockText()); }
public void GetBlockAndInmediate() { Loader loader = new Loader(new StringReader("line 1\nline 2\n!inmediate!\n"), new VmCompiler()); Assert.IsNotNull(loader); Assert.AreEqual("line 1\r\nline 2\r\n", loader.GetBlockText()); Assert.AreEqual("inmediate", loader.GetBlockText()); Assert.IsNull(loader.GetBlockText()); }
public void GetTwoBlocks() { Loader loader = new Loader(new StringReader("line 1\r\nline 2\r\n!\r\nline 3\r\nline 4\r\n!\r\n"), new SimpleCompiler()); Assert.IsNotNull(loader); Assert.AreEqual("line 1\r\nline 2\r\n", loader.GetBlockText()); Assert.AreEqual("line 3\r\nline 4\r\n", loader.GetBlockText()); Assert.IsNull(loader.GetBlockText()); }