예제 #1
0
        private void ReserveStrings(ReservedIndexedCharList list)
        {
            while (list.ToStringOnlyNoneReserved().Contains("'"))
            {
                list.ReserveFromStartAndStopChar('\'', '\'', new PathToken());
            }

            while (list.ToStringOnlyNoneReserved().Contains("\""))
            {
                list.ReserveFromStartAndStopChar('"', '"', new StringToken());
            }
        }
        public void ReserveFromStartAndStopCharWorksCorrectly()
        {
            ReservedIndexedCharList list = new ReservedIndexedCharList("A'B'C");
            list.ReserveFromStartAndStopChar('\'', '\'', new NullToken());

            Assert.IsTrue(list.ToStringOnlyNoneReserved().Length == 2);
            Assert.IsTrue(list.ToStringOnlyNoneReserved() == "AC");
        }