public void ParseNonwordCharInVariable() { // Arrange var comparer = new TokenEqualityComparer(); // Act var tokens = Parse("a $b c$d$"); // Assert Assert.Equal( new[] { new Token(TokenCategory.Text, "a $b c"), new Token(TokenCategory.Variable, "d"), }, tokens, comparer); }
public void ParseVariables() { // Arrange var comparer = new TokenEqualityComparer(); // Act var tokens = Parse("a $b$$c$"); // Assert Assert.Equal( new[] { new Token(TokenCategory.Text, "a "), new Token(TokenCategory.Variable, "b"), new Token(TokenCategory.Variable, "c") }, tokens, comparer); }