<s> import appvalidator . textfilter as textfilter <EOL> def test_is_ctrl_char ( ) : <EOL> "<STR_LIT>" <EOL> for i in range ( <NUM_LIT:0> , <NUM_LIT> ) : <EOL> result = textfilter . is_ctrl_char ( chr ( i ) ) <EOL> assert ( i < <NUM_LIT:32> and i not in ( <NUM_LIT:9> , <NUM_LIT:10> , <NUM_LIT> ) ) == result <EOL> assert not textfilter . is_ctrl_char ( chr ( <NUM_LIT:3> ) , <NUM_LIT:50> ) <EOL> def test_is_standard_ascii ( ) : <EOL> "<STR_LIT>" <EOL> assert not textfilter . is_standard_ascii ( chr ( <NUM_LIT:3> ) ) <EOL> assert textfilter . is_standard_ascii ( chr ( <NUM_LIT:9> ) ) <EOL> assert not textfilter . is_standard_ascii ( chr ( <NUM_LIT> ) ) <EOL> assert not textfilter . is_standard_ascii ( chr ( <NUM_LIT:200> ) ) <EOL> def test_filter_ascii ( ) : <EOL> "<STR_LIT>" <EOL> assert not textfilter . filter_ascii ( "<STR_LIT>" . join ( [ chr ( x ) for <EOL> x in <EOL> range ( <NUM_LIT:9> ) ] ) <EOL> ) . replace ( "<STR_LIT:?>" , "<STR_LIT>" ) <EOL> assert not any ( x . replace ( "<STR_LIT:?>" , "<STR_LIT>" ) for <EOL> x in <EOL> textfilter . filter_ascii ( [ chr ( x ) for x in range ( <NUM_LIT:9> ) ] ) ) </s>
