public void CanParseSingleQuotedListWithCommaSeparator()
        {
            string line = "'batman', 'bruce wayne', 'gambit'";
            IDictionary <string, string> items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
        public void CanParseQuotedListNewLine()
        {
            string line = "'batman', 'bruce wayne', 'gambit'\r\n";
            IDictionary <string, string> items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
        public void CanParseDoubleQuotedListWithCommaSeparatorWithInnerComma()
        {
            string line = "\"batman\", \"bruce, wayne\", \"gambit\"";
            IDictionary <string, string> items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce, wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
示例#4
0
        public void CanParseSingleQuotedListWithCommaSeparatorWithInnerComma()
        {
            var line  = "'batman', 'bruce, wayne', 'gambit'";
            var items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce, wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
示例#5
0
        public void CanParseNonQuotedListWithCommaSeparator()
        {
            var line  = "batman, bruce wayne, gambit";
            var items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
示例#6
0
        public void CanParseQuotedListNewLine()
        {
            var line  = "'batman', 'bruce wayne', 'gambit'\r\n";
            var items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }