GetBlockText() 공개 메소드

public GetBlockText ( ) : string
리턴 string
예제 #1
0
        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());
        }
예제 #2
0
        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());
        }
예제 #3
0
        public void GetSpaceLine()
        {
            Loader loader = new Loader(new StringReader(" \n"), new VmCompiler());

            Assert.AreEqual(" \r\n", loader.GetBlockText());
            Assert.IsNull(loader.GetBlockText());
        }
예제 #4
0
        public void GetEmptyLine()
        {
            Loader loader = new Loader(new StringReader("\n"), new VmCompiler());

            Assert.IsNull(loader.GetBlockText());
        }
예제 #5
0
        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());
        }
예제 #6
0
        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());
        }