diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-03 13:35:53 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-06-19 16:39:56 +0200 |
commit | 1261c9b2f483a63894f629cc0400970bd036239d (patch) | |
tree | 3deebeba010a764a5e91792095bab0d4bab302a4 /tests/auto/tools/qmake/testdata/functions | |
parent | bf984d5f24741a52a70024f3f43432307281f0ae (diff) |
add $$format_number() function
Change-Id: I04266c1f5fb72af94073f3f508cee59085e365b6
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'tests/auto/tools/qmake/testdata/functions')
-rw-r--r-- | tests/auto/tools/qmake/testdata/functions/functions.pro | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/tools/qmake/testdata/functions/functions.pro b/tests/auto/tools/qmake/testdata/functions/functions.pro index 0b70b24158..2972128948 100644 --- a/tests/auto/tools/qmake/testdata/functions/functions.pro +++ b/tests/auto/tools/qmake/testdata/functions/functions.pro @@ -113,3 +113,17 @@ out = "easy \"less easy\" sca\$\${LITERAL_HASH}ry crazy\$\$escape_expand(\\\\t\\ testReplace($$val_escape(in), $$out, "val_escape") testReplace($$shadowed($$PWD/something), $$OUT_PWD/something, "shadowed") + +#format_number +spc = " " +testReplace($$format_number(13), 13, "simple number format") +testReplace($$format_number(-13), -13, "negative number format") +testReplace($$format_number(13, ibase=16), 19, "hex input number format") +testReplace($$format_number(13, obase=16), d, "hex output number format") +testReplace($$format_number(13, width=5), " $$spc 13", "right aligned number format") +testReplace($$format_number(13, width=5 leftalign), "13 $$spc ", "left aligned number format") +testReplace($$format_number(13, width=5 zeropad), "00013", "zero-padded number format") +testReplace($$format_number(13, width=5 alwayssign), "$$spc +13", "always signed number format") +testReplace($$format_number(13, width=5 alwayssign zeropad), "+0013", "zero-padded always signed number format") +testReplace($$format_number(13, width=5 padsign), " $$spc 13", "sign-padded number format") +testReplace($$format_number(13, width=5 padsign zeropad), " 0013", "zero-padded sign-padded number format") |