public void CssTokenizerOnlyLineFeed() { var teststring = "\n"; var tokenizer = new CssTokenizer(new TextSource(teststring)); var token = tokenizer.NextToken(); Assert.Equal("\n", token.Data); }
public void CssTokenizerOnlyCarriageReturn() { var teststring = "\r"; var tokenizer = new CssTokenizer(new TextSource(teststring)); var token = tokenizer.NextToken(); Assert.Equal("\n", token.Data); }
public void CssParserAtRule() { var teststring = "@media { background: blue; }"; var tokenizer = new CssTokenizer(new TextSource(teststring)); var token = tokenizer.NextToken(); Assert.Equal(CssTokenType.AtKeyword, token.Type); }
public void CssParserIdentifier() { var teststring = "h1 { background: blue; }"; var tokenizer = new CssTokenizer(new TextSource(teststring)); var token = tokenizer.NextToken(); var type = typeof(string).GetType().GetField(""); Assert.Equal(CssTokenType.Ident, token.Type); }
public void CssParserUrlSingleQuoted() { var url = "http://someurl"; var teststring = "url('" + url + "')"; var tokenizer = new CssTokenizer(new TextSource(teststring)); var token = tokenizer.NextToken(); Assert.Equal(url, token.Data); }