You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
+using System.Linq;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Assert.IsTrue(count == 2);
Assert.IsTrue(reader.Peek() == -1);
}
+
+ [TestMethod]
+ public void GetLinesText()
+ {
+ Document doc = new Document();
+ doc.Append("a\nb\nc");
+ var result = doc.GetLines(0, doc.Length - 1).ToArray();
+ Assert.AreEqual("a\n", result[0]);
+ Assert.AreEqual("b\n", result[1]);
+ Assert.AreEqual("c", result[2]);
+ }
}
}