summaryrefslogtreecommitdiff
path: root/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp')
-rw-r--r--tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
index af48a113e5..fa0c58b211 100644
--- a/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
+++ b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
@@ -96,6 +96,7 @@ private Q_SLOTS:
void labelledStatements3();
void multilineTernaryInProperty();
void multilineString();
+ void bug1();
};
enum { DontCheck = -2, DontIndent = -1 };
@@ -1242,6 +1243,20 @@ void tst_QMLCodeFormatter::multilineString()
checkIndent(data);
}
+void tst_QMLCodeFormatter::bug1()
+{
+ QList<Line> data;
+ data << Line("Item {")
+ << Line(" x: {")
+ << Line(" if (a==a) {}")
+ << Line(" else (b==b) {}")
+ << Line(" foo()")
+ << Line(" }")
+ << Line("}")
+ ;
+ checkIndent(data);
+}
+
QTEST_APPLESS_MAIN(tst_QMLCodeFormatter)
#include "tst_qmlcodeformatter.moc"