Skip to content
Permalink
Browse files

string truncations now uses ellipses (followup c3573b1)

  • Loading branch information
jef-n committed Feb 17, 2018
1 parent c3573b1 commit 125370076f496da384e26858aa75b0a15a595084
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/src/core/testqgsexpression.cpp
@@ -2935,7 +2935,7 @@ class TestQgsExpression: public QObject
map[QStringLiteral( "2" )] = "Two";
QCOMPARE( QgsExpression::formatPreviewString( QVariant( map ) ), QString( "<i>&lt;map: 1: 'One', 2: 'Two'&gt;</i>" ) );
map[QStringLiteral( "3" )] = "A very long string that is going to be truncated";
QCOMPARE( QgsExpression::formatPreviewString( QVariant( map ) ), QString( "<i>&lt;map: 1: 'One', 2: 'Two', 3: 'A very long string that is going to ...&gt;</i>" ) );
QCOMPARE( QgsExpression::formatPreviewString( QVariant( map ) ), QString( "<i>&lt;map: 1: 'One', 2: 'Two', 3: 'A very long string that is going to &gt;</i>" ) );

QVariantList list;
list << 1 << 2 << 3;
@@ -2944,7 +2944,7 @@ class TestQgsExpression: public QObject
QStringList stringList;
stringList << QStringLiteral( "One" ) << QStringLiteral( "Two" ) << QStringLiteral( "A very long string that is going to be truncated" );
QCOMPARE( QgsExpression::formatPreviewString( QVariant( stringList ) ),
QString( "<i>&lt;array: 'One', 'Two', 'A very long string that is going to be trunca...&gt;</i>" ) );
QString( "<i>&lt;array: 'One', 'Two', 'A very long string that is going to be trunca&gt;</i>" ) );
}
};

0 comments on commit 1253700

Please sign in to comment.
You can’t perform that action at this time.