Ejemplo n.º 1
0
        public void ParseEchoExpressionStatementTest()
        {
            //Create parser
            StatementParser statementParser = new StatementParser(Init("echo \"test\";"));
            EchoStatement parsedEchoStatement = statementParser.ParseEchoStatement();

            //Check echo statement
            Assert.AreEqual(typeof(EchoExpressionStatement), parsedEchoStatement.GetType());
            Assert.AreEqual("echo \"test\";", parsedEchoStatement.ToString());
        }
Ejemplo n.º 2
0
        public void ParseEchoEmbeddingStatementTest()
        {
            //Create parser
            StatementParser statementParser = new StatementParser(Init("echo \"left<func1() \"text\">right\";"));
            EchoStatement parsedEchoStatement = statementParser.ParseEchoStatement();

            //Check echo statement
            Assert.AreEqual(typeof(EchoEmbeddingStatement), parsedEchoStatement.GetType());
            Assert.AreEqual("echo \"left<func1\"text\">right\";", parsedEchoStatement.ToString());
        }