blob: e5daae3a574da2cb261ab0d087cfeb0bde3fa49c (
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
24
25
26
27
28
|
import sys
from build.plugins.tests import fake_ymake
sys.modules['ymake'] = fake_ymake
import xml.etree.cElementTree as ET
from build.plugins import ssqls
example = '''\
<?xml version="1.0" encoding="utf-8"?>
<DbObject>
<include path="A.ssqls"><a.h></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']
|