예제 #1
0
def ExtractKeywordsFromGroup_KeywordAssignAndMiddle_test():
  assert_that( syntax_parse._ExtractKeywordsFromGroup(
                 syntax_parse.SyntaxGroup( '', [
                   'foo end=zoo((^^//)) transparent bar',
                   'zoo goo',
                 ] ) ),
               contains_inanyorder( 'foo', 'bar', 'zoo', 'goo' ) )
예제 #2
0
def ExtractKeywordsFromGroup_ContainedSyntaxArgAllowed_test():
  eq_( ['foo', 'zoq', 'bar', 'goo', 'far' ],
       syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [
         'contained foo zoq',
         'contained bar goo',
         'far',
       ] ) ) )
예제 #3
0
def ExtractKeywordsFromGroup_KeywordWithoutNextgroup_test():
  assert_that( syntax_parse._ExtractKeywordsFromGroup(
                 syntax_parse.SyntaxGroup( '', [
                   'skipempty foo bar',
                   'zoo goo',
                 ] ) ),
               contains_inanyorder( 'skipempty', 'foo', 'bar', 'zoo', 'goo' ) )
예제 #4
0
def ExtractKeywordsFromGroup_ContainedSyntaxArgAllowed_test():
    eq_(
        ["foo", "zoq", "bar", "goo", "far"],
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup("", ["contained foo zoq", "contained bar goo", "far"])
        ),
    )
예제 #5
0
def ExtractKeywordsFromGroup_Commas_test():
  eq_( ['foo', 'bar', 'zoo', 'goo' ],
       syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [
         'foo, bar,',
         'zoo goo',
       ] ) )
     )
예제 #6
0
def ExtractKeywordsFromGroup_WithLinksTo_test():
  eq_( ['foo', 'bar', 'zoo', 'goo' ],
       syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [
         'foo bar',
         'zoo goo',
         'links to Statement'
       ] ) ) )
예제 #7
0
def ExtractKeywordsFromGroup_KeywordAssignAndMiddle_test():
    eq_(['foo', 'bar', 'zoo', 'goo'],
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup('', [
                'foo end=zoo((^^//)) transparent bar',
                'zoo goo',
            ])))
예제 #8
0
def ExtractKeywordsFromGroup_Commas_test():
  assert_that( syntax_parse._ExtractKeywordsFromGroup(
                 syntax_parse.SyntaxGroup( '', [
                   'foo, bar,',
                   'zoo goo',
                 ] ) ),
               contains_inanyorder( 'foo', 'bar', 'zoo', 'goo' ) )
예제 #9
0
def ExtractKeywordsFromGroup_KeywordMiddle_test():
    eq_(['foo', 'bar', 'zoo', 'goo'],
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup('', [
                'foo oneline bar',
                'zoo goo',
            ])))
예제 #10
0
def ExtractKeywordsFromGroup_WithLinksTo_test():
    eq_(
        ["foo", "bar", "zoo", "goo"],
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup("", ["foo bar", "zoo goo", "links to Statement"])
        ),
    )
예제 #11
0
def ExtractKeywordsFromGroup_KeywordMiddle_test():
  eq_( ['foo', 'bar', 'zoo', 'goo' ],
       syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [
         'foo oneline bar',
         'zoo goo',
       ] ) )
     )
예제 #12
0
def ExtractKeywordsFromGroup_KeywordAssignAndMiddle_test():
    eq_(
        ["foo", "bar", "zoo", "goo"],
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup("", ["foo end=zoo((^^//)) transparent bar", "zoo goo"])
        ),
    )
예제 #13
0
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'))
예제 #14
0
def ExtractKeywordsFromGroup_KeywordWithoutNextgroup_test():
    assert_that(
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup('', [
                'skipempty foo bar',
                'zoo goo',
            ])), contains_inanyorder('skipempty', 'foo', 'bar', 'zoo', 'goo'))
예제 #15
0
def ExtractKeywordsFromGroup_Commas_test():
    assert_that(
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup('', [
                'foo, bar,',
                'zoo goo',
            ])), contains_inanyorder('foo', 'bar', 'zoo', 'goo'))
예제 #16
0
def ExtractKeywordsFromGroup_Commas_test():
    eq_(['foo', 'bar', 'zoo', 'goo'],
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup('', [
                'foo, bar,',
                'zoo goo',
            ])))
예제 #17
0
def ExtractKeywordsFromGroup_KeywordAssignAndMiddle_test():
  eq_( ['foo', 'bar', 'zoo', 'goo' ],
       syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [
         'foo end=zoo((^^//)) transparent bar',
         'zoo goo',
       ] ) )
     )
예제 #18
0
def ExtractKeywordsFromGroup_KeywordStarts_test():
    eq_(
        ["foo", "bar", "zoo", "goo"],
        syntax_parse._ExtractKeywordsFromGroup(
            syntax_parse.SyntaxGroup("", ["foo bar", "transparent boo baa", "zoo goo"])
        ),
    )
예제 #19
0
def ExtractKeywordsFromGroup_KeywordMiddle_test():
  assert_that( syntax_parse._ExtractKeywordsFromGroup(
                 syntax_parse.SyntaxGroup( '', [
                   'foo contained bar',
                   'zoo goo'
                 ] ) ),
               contains_inanyorder( 'foo', 'contained', 'bar', 'zoo', 'goo' ) )
예제 #20
0
def ExtractKeywordsFromGroup_KeywordStarts_test():
  eq_( ['foo', 'bar', 'zoo', 'goo' ],
       syntax_parse._ExtractKeywordsFromGroup( syntax_parse.SyntaxGroup('', [
         'foo bar',
         'transparent boo baa',
         'zoo goo',
       ] ) ) )
예제 #21
0
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' ) )
예제 #22
0
def ExtractKeywordsFromGroup_KeywordMiddle_test():
  assert_that( syntax_parse._ExtractKeywordsFromGroup(
                 syntax_parse.SyntaxGroup( '', [
                   'foo contained bar',
                   'zoo goo'
                 ] ) ),
               contains_inanyorder( 'foo', 'contained', 'bar', 'zoo', 'goo' ) )
예제 #23
0
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' ) )
예제 #24
0
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'))
예제 #25
0
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' ) )
예제 #26
0
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' ) )
예제 #27
0
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' ) )
예제 #28
0
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' ) )
예제 #29
0
def ExtractKeywordsFromGroup_Commas_test():
    eq_(
        ["foo", "bar", "zoo", "goo"],
        syntax_parse._ExtractKeywordsFromGroup(syntax_parse.SyntaxGroup("", ["foo, bar,", "zoo goo"])),
    )
예제 #30
0
def ExtractKeywordsFromGroup_KeywordMiddle_test():
    eq_(
        ["foo", "bar", "zoo", "goo"],
        syntax_parse._ExtractKeywordsFromGroup(syntax_parse.SyntaxGroup("", ["foo oneline bar", "zoo goo"])),
    )