From 22f3800cac47b1b3d10474e8489ddb83cffd4b1e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 13 May 2016 15:58:20 +0200 Subject: add $$str_size() function this is strlen(), but the name is matched to $$size(), just namespaced to reflect that it operates on a string value rather than a list variable. [ChangeLog][qmake] Added $$str_size() function. Change-Id: I56c8b863da244e66bd283257a66b197aa73b0e57 Reviewed-by: Leena Miettinen Reviewed-by: Joerg Bornemann Reviewed-by: Lars Knoll --- tests/auto/tools/qmakelib/evaltest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/auto/tools/qmakelib') diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp index a516f91070..f12b11261a 100644 --- a/tests/auto/tools/qmakelib/evaltest.cpp +++ b/tests/auto/tools/qmakelib/evaltest.cpp @@ -826,6 +826,18 @@ void tst_qmakelib::addReplaceFunctions(const QString &qindir) << "##:1: size(var) requires one argument." << true; + QTest::newRow("$$str_size()") + << "VAR = $$str_size(one two three)" + << "VAR = 13" + << "" + << true; + + QTest::newRow("$$str_size(): bad number of arguments") + << "VAR = $$str_size(1, 2)" + << "VAR =" + << "##:1: str_size(str) requires one argument." + << true; + QTest::newRow("$$fromfile(): right var") << "VAR = $$fromfile(" + qindir + "/fromfile/infile.prx, DEFINES)" << "VAR = QT_DLL" -- cgit v1.2.3