#NEWLINE# def doTest( ) : #NEWLINE# #INDENT# text = 'body {width: 1px}' #NEWLINE# ( logs , warns , errors ) = doCssCheck ( text ) #NEWLINE# equal ( len ( logs ) , 2 , 'two logs' ) #NEWLINE# equal ( len ( warns ) , 1 , 'one warn happened' ) #NEWLINE# equal ( len ( errors ) , 1 , 'one error happened' ) #NEWLINE# equal ( fill ( warns [ 0 ] ) , 'each rule in "body" need semicolon in the end, "width" has not' , 'warn rule text is ok' ) #NEWLINE# equal ( fill ( errors [ 0 ] ) , 'should not set style for html tag in "body"' , 'error rule text is ok' )