public void Token_splits_on_spaces_correctly() { var s = "//*[@id=\"hello space\"]"; var tokens = DomPathParser.Tokens(s); Assert.Equal( new [] { "//", "*", "[", "@", "id", "=", "hello space", "]", "<eof>" }, tokens.Select(t => t.Value) ); }
public void Tokens_splits_on_quotes_internally() { var s = "/root//*[@id=\"hello\"]"; var tokens = DomPathParser.Tokens(s); Assert.Equal( new [] { "/", "root", "//", "*", "[", "@", "id", "=", "hello", "]", "<eof>" }, tokens.Select(t => t.Value) ); }