Esempio n. 1
0
        public void AddOutputLineNumbersSingleLine()
        {
            var original = "Output(\"Test\");";
            var expected = "Output(\"Test\",1);";

            Assert.AreEqual(expected, ScriptEngine.AddOutputLineNumbers(original));
        }
Esempio n. 2
0
        public void AddOutputLineNumbersNoArgsMultiline1()
        {
            var original = @"Output(
);";
            var expected = @"Output(
1);";

            Assert.AreEqual(expected, ScriptEngine.AddOutputLineNumbers(original));
        }
Esempio n. 3
0
        public void AddOutputLineNumbersMultiline2()
        {
            var original = @"var x = ""test"";
Output(x);
// This is a comment";

            var expected = @"var x = ""test"";
Output(x,2);
// This is a comment";

            Assert.AreEqual(expected, ScriptEngine.AddOutputLineNumbers(original));
        }