aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/tests/test_ssqls.py
blob: db9e8c93bc59b6f214fee264d1a7b18d11c48053 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import xml.etree.cElementTree as ET 
 
from build.plugins import ssqls 
 
 
example = '''\ 
<?xml version="1.0" encoding="utf-8"?> 
<DbObject> 
    <include path="A.ssqls">&lt;a.h&gt;</include> 
    <include>"b.h"</include> 
 
    <ancestors> 
        <ancestor path="C.ssqls"/> 
    </ancestors> 
</DbObject> 
''' 
 
 
def test_include_parser(): 
    doc = ET.fromstring(example) 
    xmls, headers = ssqls.SSQLSParser.parse_doc(doc) 
    assert headers == ['a.h', 'b.h', 'C.h'] 
    assert xmls == ['A.ssqls', 'C.ssqls']