def test_get_words_c():
 expected_words = ['f', 'float', 'foo', 'h', 'i', 'include', 'int', 'main', 'n', 'printf', 'pvar', 'return', 'stdio', 'struct', 'var', 'x', 'y']
 assert (sorted(expected_words) == sorted(get_words_by_filename('example.c')))
 assert (sorted(expected_words) == sorted(get_words_by_content('example.c')))

def test_get_words_c ( ) : expected_words = [ 'f' , 'float' , 'foo' , 'h' , 'i' , 'include' , 'int' , 'main' , 'n' , 'printf' , 'pvar' , 'return' , 'stdio' , 'struct' , 'var' , 'x' , 'y' ] assert ( sorted ( expected_words ) == sorted ( get_words_by_filename ( 'example.c' ) ) ) assert ( sorted ( expected_words ) == sorted ( get_words_by_content ( 'example.c' ) ) )
test for get word from c file syntax .