def ExtractKeywordsFromGroup_KeywordMiddle_test(): eq_(['foo', 'bar', 'zoo', 'goo'], syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'foo oneline bar', 'zoo goo', ])))
def ExtractKeywordsFromGroup_KeywordAssign_test(): eq_(['foo', 'bar', 'zoo', 'goo'], syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'foo end=zoo((^^//)) bar', 'zoo goo', ])))
def ExtractKeywordsFromGroup_KeywordWithoutNextgroup_test(): assert_that( syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'skipempty foo bar', 'zoo goo', ])), contains_inanyorder('skipempty', 'foo', 'bar', 'zoo', 'goo'))
def ExtractKeywordsFromGroup_Commas_test(): eq_(['foo', 'bar', 'zoo', 'goo'], syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'foo, bar,', 'zoo goo', ])))
def ExtractKeywordsFromGroup_KeywordAssignAndMiddle_test(): assert_that( syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'nextgroup=zoo foo skipnl bar', 'zoo goo', ])), contains_inanyorder('foo', 'skipnl', 'bar', 'zoo', 'goo'))
def ExtractKeywordsFromGroup_Commas_test(): assert_that( syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'foo, bar,', 'zoo goo', ])), contains_inanyorder('foo', 'bar', 'zoo', 'goo'))
def ExtractKeywordsFromGroup_ContainedSyntaxArgAllowed_test(): eq_( ['foo', 'zoq', 'bar', 'goo', 'far' ], syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'contained foo zoq', 'contained bar goo', 'far', ] ) ) )
def ExtractKeywordsFromGroup_KeywordStarts_test(): eq_( ['foo', 'bar', 'zoo', 'goo' ], syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'foo bar', 'transparent boo baa', 'zoo goo', ] ) ) )
def ExtractKeywordsFromGroup_WithLinksTo_test(): eq_( ['foo', 'bar', 'zoo', 'goo' ], syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'foo bar', 'zoo goo', 'links to Statement' ] ) ) )
def ExtractKeywordsFromGroup_KeywordStarts_test(): assert_that( syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [ 'foo bar', 'contained boo baa', 'zoo goo', ])), contains_inanyorder('foo', 'bar', 'boo', 'baa', 'zoo', 'goo'))
def ExtractKeywordsFromGroup_ContainedSyntaxArgAllowed_test(): assert_that( syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup( '', [ 'contained foo zoq', 'contained bar goo', 'far' ] ) ), contains_inanyorder( 'foo', 'zoq', 'bar', 'goo', 'far' ) )
def ExtractKeywordsFromGroup_WithLinksTo_test(): assert_that( syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup( '', [ 'foo bar', 'zoo goo', 'links to Statement' ] ) ), contains_inanyorder( 'foo', 'bar', 'zoo', 'goo' ) )
def ExtractKeywordsFromGroup_KeywordMiddle_test(): assert_that( syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', ['foo contained bar', 'zoo goo'])), contains_inanyorder('foo', 'contained', 'bar', 'zoo', 'goo'))