summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xutil/cmake/pro2cmake.py2
-rw-r--r--util/cmake/tests/data/lc.pro10
-rwxr-xr-xutil/cmake/tests/test_parsing.py5
3 files changed, 16 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 06d0c925d9..ef81d4cfef 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -518,7 +518,7 @@ class QmakeParser:
pp.ParserElement.setDefaultWhitespaceChars(' \t')
LC = pp.Suppress(pp.Literal('\\\n'))
- EOL = pp.Suppress(pp.Literal('\n') ^ pp.LineEnd())
+ EOL = pp.Suppress(pp.LineEnd())
Else = pp.Keyword('else')
Identifier = pp.Word(pp.alphas + '_', bodyChars=pp.alphanums+'_-./')
BracedValue = pp.nestedExpr(ignoreExpr=pp.quotedString \
diff --git a/util/cmake/tests/data/lc.pro b/util/cmake/tests/data/lc.pro
new file mode 100644
index 0000000000..def80e7c95
--- /dev/null
+++ b/util/cmake/tests/data/lc.pro
@@ -0,0 +1,10 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qmacstyle \
+ qstyle \
+ qstyleoption \
+ qstylesheetstyle \
+
+!qtConfig(private_tests): SUBDIRS -= \
+ qstylesheetstyle \
+
diff --git a/util/cmake/tests/test_parsing.py b/util/cmake/tests/test_parsing.py
index 2f227e0ba2..79ad0a4945 100755
--- a/util/cmake/tests/test_parsing.py
+++ b/util/cmake/tests/test_parsing.py
@@ -300,3 +300,8 @@ def test_realworld_qtconfig():
assert len(result) == 1
validate_op('MODULE_AUX_INCLUDES', '=', ['\\$\\$QT_MODULE_INCLUDE_BASE/QtANGLE'], result[0])
+
+def test_realworld_lc():
+ result = parse_file(_tests_path + '/data/lc.pro')
+ assert len(result) == 3
+