Skip to content
Permalink
Browse files

Add test for format expression function

  • Loading branch information
NathanW2 committed Jan 26, 2013
1 parent 96565d1 commit 5ed164abab7007b8709ad6c12318867502873d77
Showing with 1 addition and 0 deletions.
  1. +1 −0 tests/src/core/testqgsexpression.cpp
@@ -283,6 +283,7 @@ class TestQgsExpression: public QObject
QTest::newRow( "lpad" ) << "lpad('Hello', 10, 'x')" << false << QVariant( "Helloxxxxx" );
QTest::newRow( "lpad truncate" ) << "rpad('Hello', 4, 'x')" << false << QVariant( "Hell" );
QTest::newRow( "title" ) << "title(' HeLlO WORLD ')" << false << QVariant( " Hello World " );
QTest::newRow( "format" ) << "format('%1 %2 %3 %1', 'One', 'Two', 'Three')" << false << QVariant( "One Two Three One" );

// implicit conversions
QTest::newRow( "implicit int->text" ) << "length(123)" << false << QVariant( 3 );

0 comments on commit 5ed164a

Please sign in to comment.