1 54 package org.w3c.tidy; 55 56 import junit.framework.TestCase; 57 58 59 64 public class LexerTest extends TestCase 65 { 66 67 70 public final void testIsCSS1SelectorEscapedNumberTooLong() 71 { 72 assertFalse("\\77777abc is not a valid css selector", Lexer.isCSS1Selector("\\77777abc")); 73 } 74 75 78 public final void testIsCSS1SelectorClassPrefixStartsWithDigit() 79 { 80 assertFalse("77abc is not a valid css selector", Lexer.isCSS1Selector("77abc")); 81 } 82 83 86 public final void testIsCSS1SelectorUnescapedInvalidCharacter() 87 { 88 assertFalse("abc\b is not a valid css selector", Lexer.isCSS1Selector("abc\b")); 89 } 90 91 94 public final void testIsCSS1SelectorPlainOldName() 95 { 96 assertTrue("abc123 is a valid css selector", Lexer.isCSS1Selector("abc123")); 97 } 98 99 102 public final void testIsCSS1SelectorBeginWithEscapedNumber() 103 { 104 assertTrue("\\77abc is a valid css selector", Lexer.isCSS1Selector("\\77abc")); 105 } 106 107 110 public final void testIsCSS1SelectorEscapedNumber() 111 { 112 assertTrue("abc\\8 is a valid css selector", Lexer.isCSS1Selector("abc\\8")); 113 } 114 115 } | Popular Tags |