Skip to content

Commit

Permalink
string truncations now uses ellipses (followup c3573b1)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 17, 2018
1 parent c3573b1 commit 1253700
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/core/testqgsexpression.cpp
Expand Up @@ -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;
Expand All @@ -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>" ) );
}
};

Expand Down

0 comments on commit 1253700

Please sign in to comment.