aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/tests/test_ssqls.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
committeralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
commit056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch)
tree4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/plugins/tests/test_ssqls.py
parent269126dcced1cc8b53eb4398b4a33e5142f10290 (diff)
downloadydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/plugins/tests/test_ssqls.py')
-rw-r--r--build/plugins/tests/test_ssqls.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/build/plugins/tests/test_ssqls.py b/build/plugins/tests/test_ssqls.py
new file mode 100644
index 0000000000..08798b1591
--- /dev/null
+++ b/build/plugins/tests/test_ssqls.py
@@ -0,0 +1,27 @@
+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">&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']