diff options
Diffstat (limited to 'tests/auto/qml/qmlformat')
-rw-r--r-- | tests/auto/qml/qmlformat/data/inlineComponents.formatted.qml | 10 | ||||
-rw-r--r-- | tests/auto/qml/qmlformat/data/inlineComponents.qml | 6 | ||||
-rw-r--r-- | tests/auto/qml/qmlformat/tst_qmlformat.cpp | 7 |
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/data/inlineComponents.formatted.qml b/tests/auto/qml/qmlformat/data/inlineComponents.formatted.qml new file mode 100644 index 0000000000..5349280f2b --- /dev/null +++ b/tests/auto/qml/qmlformat/data/inlineComponents.formatted.qml @@ -0,0 +1,10 @@ +Item { + component CustomText: Text { + Text { + color: "red" + text: "Test Text" + } + + } + +} diff --git a/tests/auto/qml/qmlformat/data/inlineComponents.qml b/tests/auto/qml/qmlformat/data/inlineComponents.qml new file mode 100644 index 0000000000..6eeb3dd965 --- /dev/null +++ b/tests/auto/qml/qmlformat/data/inlineComponents.qml @@ -0,0 +1,6 @@ +Item { +component CustomText: Text { +color: "red" +text: "Test Text" +} +} diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp index 9e72b587b9..cda7f0d80f 100644 --- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp +++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp @@ -54,6 +54,7 @@ private Q_SLOTS: void testStatesAndTransitions(); void testLargeBindings(); void testVerbatimStrings(); + void testInlineComponents(); void testQtbug85003(); @@ -240,6 +241,12 @@ void TestQmlformat::testVerbatimStrings() readTestFile("verbatimString.formatted.qml")); } +void TestQmlformat::testInlineComponents() +{ + QCOMPARE(runQmlformat(testFile("inlineComponents.qml"), false, true), + readTestFile("inlineComponents.formatted.qml")); +} + void TestQmlformat::testNestedIf() { QCOMPARE(runQmlformat(testFile("nestedIf.qml"), false, true), |