From 8175e31bda60eb45ae867b0d2c4b6a4fb179c365 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 30 Apr 2015 16:52:21 +0200 Subject: remove now redundant tests the functionality is now covered by the qmakelib test. Change-Id: Id627f573fb247ff3b86558509e27b6a9862c1a59 Reviewed-by: Joerg Bornemann --- .../tools/qmake/testdata/comments/comments.pro | 31 ---- .../qmake/testdata/func_export/func_export.pro | 19 --- .../testdata/func_variables/func_variables.pro | 49 ------ tests/auto/tools/qmake/testdata/functions/1.cpp | 32 ---- tests/auto/tools/qmake/testdata/functions/2.cpp | 32 ---- .../tools/qmake/testdata/functions/functions.pro | 184 --------------------- .../tools/qmake/testdata/functions/infiletest.pro | 1 - .../auto/tools/qmake/testdata/functions/one/1.cpp | 32 ---- .../auto/tools/qmake/testdata/functions/one/2.cpp | 32 ---- tests/auto/tools/qmake/testdata/functions/textfile | 1 - .../qmake/testdata/functions/three/wildcard21.cpp | 32 ---- .../qmake/testdata/functions/three/wildcard22.cpp | 32 ---- .../auto/tools/qmake/testdata/functions/two/1.cpp | 32 ---- .../auto/tools/qmake/testdata/functions/two/2.cpp | 32 ---- .../tools/qmake/testdata/functions/wildcard21.cpp | 32 ---- .../tools/qmake/testdata/functions/wildcard22.cpp | 32 ---- .../testdata/include_function/existing_file.pri | 3 - .../include_function/include_existing_file.pro | 7 - .../include_function/include_missing_file.pro | 3 - .../include_function/include_missing_file2.pro | 3 - .../tools/qmake/testdata/include_function/main.cpp | 37 ----- tests/auto/tools/qmake/testdata/json/json.pro | 26 --- tests/auto/tools/qmake/testdata/json/test.json | 9 - .../tools/qmake/testdata/operators/operators.pro | 23 --- .../tools/qmake/testdata/variables/variables.pro | 12 -- tests/auto/tools/qmake/tst_qmake.cpp | 93 ----------- 26 files changed, 821 deletions(-) delete mode 100644 tests/auto/tools/qmake/testdata/comments/comments.pro delete mode 100644 tests/auto/tools/qmake/testdata/func_export/func_export.pro delete mode 100644 tests/auto/tools/qmake/testdata/func_variables/func_variables.pro delete mode 100644 tests/auto/tools/qmake/testdata/functions/1.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/2.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/functions.pro delete mode 100644 tests/auto/tools/qmake/testdata/functions/infiletest.pro delete mode 100644 tests/auto/tools/qmake/testdata/functions/one/1.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/one/2.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/textfile delete mode 100644 tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/two/1.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/two/2.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/wildcard21.cpp delete mode 100644 tests/auto/tools/qmake/testdata/functions/wildcard22.cpp delete mode 100644 tests/auto/tools/qmake/testdata/include_function/existing_file.pri delete mode 100644 tests/auto/tools/qmake/testdata/include_function/include_existing_file.pro delete mode 100644 tests/auto/tools/qmake/testdata/include_function/include_missing_file.pro delete mode 100644 tests/auto/tools/qmake/testdata/include_function/include_missing_file2.pro delete mode 100644 tests/auto/tools/qmake/testdata/include_function/main.cpp delete mode 100644 tests/auto/tools/qmake/testdata/json/json.pro delete mode 100644 tests/auto/tools/qmake/testdata/json/test.json delete mode 100644 tests/auto/tools/qmake/testdata/operators/operators.pro delete mode 100644 tests/auto/tools/qmake/testdata/variables/variables.pro (limited to 'tests') diff --git a/tests/auto/tools/qmake/testdata/comments/comments.pro b/tests/auto/tools/qmake/testdata/comments/comments.pro deleted file mode 100644 index 510ab95ab3..0000000000 --- a/tests/auto/tools/qmake/testdata/comments/comments.pro +++ /dev/null @@ -1,31 +0,0 @@ -LIST = 1 2 3 4 #a comment -!equals( LIST, 1 2 3 4 ) { - message( "FAILED: inline comment" ) -} - -LIST = 1 \ - 2 \ -# 3 \ - 4 -!equals( LIST, 1 2 4 ) { - message( "FAILED: commented out continuation" ) -} - -LIST = 1 \ - 2 \#comment - 3 \ - 4 -!equals( LIST, 1 2 3 4 ) { - message( "FAILED: comment at end of continuation") -} - - -LIST = 1 2 3 4#comment -!equals( LIST, 1 2 3 4 ) { - message( "FAILED: no space before comment" ) -} - -LIST = 1 2 3 4$${LITERAL_HASH}five -!equals( LIST, 1 2 3 4$${LITERAL_HASH}five ) { - message( "FAILED: using LITERAL_HASH" ) -} diff --git a/tests/auto/tools/qmake/testdata/func_export/func_export.pro b/tests/auto/tools/qmake/testdata/func_export/func_export.pro deleted file mode 100644 index fc3818985b..0000000000 --- a/tests/auto/tools/qmake/testdata/func_export/func_export.pro +++ /dev/null @@ -1,19 +0,0 @@ -defineTest(doExport) { - EXPORTED += $$1 - export(EXPORTED) -} - -defineTest(callDoExport) { - doExport(bar) - doExport(baz) - EXPORTED = oink - !isEqual(EXPORTED, "oink") { - message( "FAILED: function-scope exports [$$EXPORTED] != oink" ) - } -} - -doExport(foo) -callDoExport() -!isEqual(EXPORTED, "foo bar baz") { - message( "FAILED: global-scope exports [$$EXPORTED] != foo bar baz" ) -} diff --git a/tests/auto/tools/qmake/testdata/func_variables/func_variables.pro b/tests/auto/tools/qmake/testdata/func_variables/func_variables.pro deleted file mode 100644 index cc13437f4a..0000000000 --- a/tests/auto/tools/qmake/testdata/func_variables/func_variables.pro +++ /dev/null @@ -1,49 +0,0 @@ -defineTest(testVariable) { - varname=$$1 - value=$$eval($$varname) - RESULT=$$value - export(RESULT) -} - -defineTest(callTest) { - myvar=$$1 - testVariable(myvar) -} - -defineTest(callTestExport) { - myvar=$$1 - export(myvar) - testVariable(myvar) -} - -defineTest(callTestExportChange) { - myvar=foo - export(myvar) - myvar=$$1 - testVariable(myvar) -} - -value=direct -myvar=$$value -testVariable(myvar) -!isEqual(RESULT,$$value) { - message( "FAILED: result [$$RESULT] != $$value" ) -} - -value=export -callTestExport($$value) -!isEqual(RESULT,$$value) { - message( "FAILED: result [$$RESULT] != $$value" ) -} - -value=export_and_change -callTestExportChange($$value) -!isEqual(RESULT,$$value) { - message( "FAILED: result [$$RESULT] != $$value" ) -} - -value=local -callTest($$value) -!isEqual(RESULT,$$value) { - message( "FAILED: result [$$RESULT] != $$value" ) -} diff --git a/tests/auto/tools/qmake/testdata/functions/1.cpp b/tests/auto/tools/qmake/testdata/functions/1.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/1.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/2.cpp b/tests/auto/tools/qmake/testdata/functions/2.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/2.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/functions.pro b/tests/auto/tools/qmake/testdata/functions/functions.pro deleted file mode 100644 index 5db8036188..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/functions.pro +++ /dev/null @@ -1,184 +0,0 @@ -VAR = qt thread - -defineTest(testReplace) { - !isEqual(1, $$2):message("FAILED: $$3: got $$1, expected $${2}.") -} - -#count -!count( VAR, 2 ) { - message( "FAILED: count function: $$VAR" ) -} - -#contains -!contains( VAR, thread ) { - message( "FAILED: contains function: $$VAR" ) -} - -#exists -!exists( functions.pro ) { - message( "FAILED: exists function" ) -} - -#isEmpty -isEmpty( VAR ) { - message( "FAILED: isEmpty function: $VAR" ) -} - -#files -!equals($$list($$files(one/*.cpp)), "one/1.cpp one/2.cpp") { - message( "FAILED: files function: one/*.cpp" ) -} -!equals($$list($$files(one/1*.cpp)), "one/1.cpp") { - message( "FAILED: files function: one/1*.cpp" ) -} -!equals($$list($$files(two/*.cpp)), "two/1.cpp two/2.cpp") { - message( "FAILED: files function: two/*.cpp" ) -} -!equals($$list($$files(three/wildcard*.cpp)), "three/wildcard21.cpp three/wildcard22.cpp") { - message( "FAILED: files function: three/wildcard*.cpp" ) -} -!equals($$list($$files(*.cpp)), "1.cpp 2.cpp wildcard21.cpp wildcard22.cpp") { - message( "FAILED: files function: *.cpp" ) -} -!equals($$list($$files(wildcard*.cpp)), "wildcard21.cpp wildcard22.cpp") { - message( "FAILED: files function: wildcard*.cpp" ) -} - -#infile -!infile( infiletest.pro, DEFINES, QT_DLL ){ - message( "FAILED: infile function" ) -} - -#include -include( infiletest.pro, "", true ) -!contains( DEFINES, QT_DLL ) { - message( "FAILED: include function: $$DEFINES" ) -} - -#replace -VERSION=1.0.0 -VERSION_replaced=$$replace(VERSION,\\.,_) -!isEqual(VERSION_replaced, 1_0_0) { - message( "FAILED: replace function: $$VERSION_replaced" ) -} - -#test functions -defineTest(myTestFunction) { - RESULT = - list=$$1 - for(l, list) { - RESULT += $$l - } - export(RESULT) -} -myTestFunction(oink baa moo) -!equals($$list($$member(RESULT, 0)), "oink") { - message("FAILED: myTestFunction: $$RESULT") -} -myTestFunction("oink baa" moo) -!equals($$list($$member(RESULT, 0)), "oink baa") { - message("FAILED: myTestFunction: $$RESULT") -} -myTestFunction(oink "baa moo") -!equals($$list($$member(RESULT, 0)), "oink") { - message("FAILED: myTestFunction: $$RESULT") -} -myTestFunction("oink baa moo") -!equals($$list($$member(RESULT, 0)), "oink baa moo") { - message("FAILED: myTestFunction: $$RESULT") -} - -#recursive -defineReplace(myRecursiveReplaceFunction) { - RESULT = - list = $$1 - RESULT += $$member(list, 0) - list -= $$RESULT - !isEmpty(list):RESULT += $$myRecursiveReplaceFunction($$list) - return($$RESULT) -} -RESULT = $$myRecursiveReplaceFunction(oink baa moo) -!isEqual(RESULT, "oink baa moo") { - message( "FAILED: myRecursiveReplaceFunction [$$RESULT] != oink baa moo" ) -} - -moo = "this is a test" "for real" -fn = $$OUT_PWD/testdir/afile -write_file($$fn, moo)|message("FAILED: write_file() failed") -exists($$fn)|message("FAILED: write_file() didn't write anything") -mooout = $$cat($$fn, line) -equals(moo, $$mooout)|message("FAILED: write_file() wrote something wrong") -moo += "another line" -write_file($$fn, moo)|message("FAILED: write_file() failed (take 2)") -mooout = $$cat($$fn, line) -equals(moo, $$mooout)|message("FAILED: write_file() wrote something wrong (take 2)") -mooadd = "yet another line" -write_file($$fn, mooadd, append)|message("FAILED: write_file() failed (append)") -moo += $$mooadd -mooout = $$cat($$fn, line) -equals(moo, $$mooout)|message("FAILED: write_file() wrote something wrong when appending") - -pn = $$OUT_PWD/testpath/subdir -mkpath($$pn)|message("FAILED: mkpath() failed") -exists($$pn)|message("FAILED: mkpath() didn't create anything") - -in = easy "less easy" sca$${LITERAL_HASH}ry crazy$$escape_expand(\\t\\r\\n) $$escape_expand(\\t)shit \'no\"way\\here -out = "easy \"less easy\" sca\$\${LITERAL_HASH}ry crazy\$\$escape_expand(\\\\t\\\\r\\\\n) \$\$escape_expand(\\\\t)shit \\\'no\\\"way\\\\here" -testReplace($$val_escape(in), $$out, "val_escape") - -testReplace($$shadowed($$PWD/something), $$OUT_PWD/something, "shadowed") -testReplace($$shadowed($$PWD), $$OUT_PWD, "shadowed (take 2)") - -#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") - -testReplace($$clean_path("c:$${DIR_SEPARATOR}crazy//path/../trolls"), "c:/crazy/trolls", "clean_path") - -testReplace($$shell_path("/crazy/trolls"), "$${QMAKE_DIR_SEP}crazy$${QMAKE_DIR_SEP}trolls", "shell_path") -testReplace($$system_path("/crazy/trolls"), "$${DIR_SEPARATOR}crazy$${DIR_SEPARATOR}trolls", "system_path") - -testReplace($$absolute_path("crazy/trolls"), "$$PWD/crazy/trolls", "absolute_path") -testReplace($$absolute_path("crazy/trolls", "/fake/path"), "/fake/path/crazy/trolls", "absolute_path with base") -testReplace($$absolute_path(""), "$$PWD", "absolute_path of empty") -testReplace($$relative_path($$_PRO_FILE_PWD_), $$basename($$_PRO_FILE_), "relative_path") -testReplace($$relative_path("/fake/trolls", "/fake/path"), "../trolls", "relative_path with base") -testReplace($$relative_path(""), "", "relative_path of empty") - -#this test is very rudimentary. the backend function is thoroughly tested in qt creator -in = "some nasty & ugly\" path & thing\\" -out_cmd = "\"some nasty & ugly\\\" path ^& thing\\\\^\"" -out_sh = "'some nasty & ugly\" path & thing\\'" -equals(QMAKE_HOST.os, Windows): \ - out = $$out_cmd -else: \ - out = $$out_sh -testReplace($$system_quote($$in), $$out, "system_quote") -!equals(QMAKE_DIR_SEP, /): \ - out = $$out_cmd -else: \ - out = $$out_sh -testReplace($$shell_quote($$in), $$out, "shell_quote") - -testReplace($$reverse($$list(one two three)), three two one, "reverse") - -testReplace($$cat(textfile), hi '"holla he"' 'hu!') - -MOD.a.depends = -MOD.b.depends = -MOD.b.priority = 1 -MOD.c.depends = a b -testReplace($$resolve_depends($$list(c), "MOD."), c b a) -MOD.a.priority = 1 -MOD.b.priority = 0 -testReplace($$resolve_depends($$list(c), "MOD."), c a b) diff --git a/tests/auto/tools/qmake/testdata/functions/infiletest.pro b/tests/auto/tools/qmake/testdata/functions/infiletest.pro deleted file mode 100644 index 821cb5cb2c..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/infiletest.pro +++ /dev/null @@ -1 +0,0 @@ -DEFINES = QT_DLL diff --git a/tests/auto/tools/qmake/testdata/functions/one/1.cpp b/tests/auto/tools/qmake/testdata/functions/one/1.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/one/1.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/one/2.cpp b/tests/auto/tools/qmake/testdata/functions/one/2.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/one/2.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/textfile b/tests/auto/tools/qmake/testdata/functions/textfile deleted file mode 100644 index a8248ed6f8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/textfile +++ /dev/null @@ -1 +0,0 @@ -hi "holla he" hu! diff --git a/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp b/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp b/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/two/1.cpp b/tests/auto/tools/qmake/testdata/functions/two/1.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/two/1.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/two/2.cpp b/tests/auto/tools/qmake/testdata/functions/two/2.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/two/2.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp b/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp b/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp deleted file mode 100644 index 8bdc2e59e8..0000000000 --- a/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ diff --git a/tests/auto/tools/qmake/testdata/include_function/existing_file.pri b/tests/auto/tools/qmake/testdata/include_function/existing_file.pri deleted file mode 100644 index 8b9aaca340..0000000000 --- a/tests/auto/tools/qmake/testdata/include_function/existing_file.pri +++ /dev/null @@ -1,3 +0,0 @@ -QT = -CONFIG = console -SOURCES = main.cpp diff --git a/tests/auto/tools/qmake/testdata/include_function/include_existing_file.pro b/tests/auto/tools/qmake/testdata/include_function/include_existing_file.pro deleted file mode 100644 index 424062a9ac..0000000000 --- a/tests/auto/tools/qmake/testdata/include_function/include_existing_file.pro +++ /dev/null @@ -1,7 +0,0 @@ -# Test to see if include(), by default, succeeds when the specific file -# to include exists -include(existing_file.pri) - -# Test to see if by specifying full set of parameters to include() -# succeeds when the specified filed to include exists -include(existing_file.pri, "", false) diff --git a/tests/auto/tools/qmake/testdata/include_function/include_missing_file.pro b/tests/auto/tools/qmake/testdata/include_function/include_missing_file.pro deleted file mode 100644 index 0b59981240..0000000000 --- a/tests/auto/tools/qmake/testdata/include_function/include_missing_file.pro +++ /dev/null @@ -1,3 +0,0 @@ -# Test to see if include(), by default, fails when the specific file -# to include does not exist -include(missing_file.pri) diff --git a/tests/auto/tools/qmake/testdata/include_function/include_missing_file2.pro b/tests/auto/tools/qmake/testdata/include_function/include_missing_file2.pro deleted file mode 100644 index 542b9ff516..0000000000 --- a/tests/auto/tools/qmake/testdata/include_function/include_missing_file2.pro +++ /dev/null @@ -1,3 +0,0 @@ -# Specifying full set of parameters to include() to test that a warning -# is shown for this non-existing file. -include(missing_file.pri, "", false) diff --git a/tests/auto/tools/qmake/testdata/include_function/main.cpp b/tests/auto/tools/qmake/testdata/include_function/main.cpp deleted file mode 100644 index 68e9c98e77..0000000000 --- a/tests/auto/tools/qmake/testdata/include_function/main.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -int main(int /*argc*/, char ** /*argv*/) -{ - return 0; -} diff --git a/tests/auto/tools/qmake/testdata/json/json.pro b/tests/auto/tools/qmake/testdata/json/json.pro deleted file mode 100644 index 33440b3209..0000000000 --- a/tests/auto/tools/qmake/testdata/json/json.pro +++ /dev/null @@ -1,26 +0,0 @@ -jsontext = $$cat($$PWD/test.json) -parseJson(jsontext, json) - -# print all keys -message(json._KEYS_ $${json._KEYS_}) - -# print array -message(json.array._KEYS_ $${json.array._KEYS_}) -for(key, json.array._KEYS_): \ - message(json.array.$${key} $$eval(json.array.$${key})) - -# print object -message(json.object._KEYS_ $${json.object._KEYS_}) -for(key, json.object._KEYS_): \ - message(json.object.$${key} $$eval(json.object.$${key})) - -# print value tyes -message(json.string: $${json.string}) -message(json.number: $${json.number}) -message(json.true: $${json.true}) -message(json.false: $${json.false}) -message(json.null: $${json.null}) - -# check that booleans work -$${json.true}: message(json.true is true) -!$${json.false}: message(json.false is false) diff --git a/tests/auto/tools/qmake/testdata/json/test.json b/tests/auto/tools/qmake/testdata/json/test.json deleted file mode 100644 index cc82908eba..0000000000 --- a/tests/auto/tools/qmake/testdata/json/test.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "array" : ["arrayItem1", "arrayItem2", "arrayItem3"], - "object" : { "key1" : "objectValue1", "key2" : "objectValue2" }, - "string" : "test string", - "number" : 999, - "true" : true, - "false" :false, - "null" : null -} diff --git a/tests/auto/tools/qmake/testdata/operators/operators.pro b/tests/auto/tools/qmake/testdata/operators/operators.pro deleted file mode 100644 index 463fa73d81..0000000000 --- a/tests/auto/tools/qmake/testdata/operators/operators.pro +++ /dev/null @@ -1,23 +0,0 @@ -VAR = qt thread - -VAR += debug -!contains( VAR, debug ) { - message( "FAILED: +=" ) -} - -VAR -= thread -contains( VAR, thread ) { - message( "FAILED: -=" ) -} - -VAR = thread -VAR *= thread -!count( VAR, 1 ) { - message( "FAILED: *=" ) -} - -VAR = thread QT_DLL debug -VAR ~= s/QT_+/Q_ -!contains( VAR, Q_DLL ) { - message( "FAILED: ~=" ) -} diff --git a/tests/auto/tools/qmake/testdata/variables/variables.pro b/tests/auto/tools/qmake/testdata/variables/variables.pro deleted file mode 100644 index e4b9eaa884..0000000000 --- a/tests/auto/tools/qmake/testdata/variables/variables.pro +++ /dev/null @@ -1,12 +0,0 @@ -VAR = 1 2 3 4 5 -JOINEDVAR = $$join( VAR, "-GLUE-", "-BEFORE-", "-AFTER-" ) -!contains( JOINEDVAR, -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER- ) { - message( "FAILED: join [$$JOINEDVAR != -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER-]" ) -} - -# To test member we need to use join -NEWVAR = $$member( VAR, 4 ) $$member( VAR, 3 ) $$member( VAR, 2 ) -JOINEDNEWVAR = $$join( NEWVAR, "-" ) -!contains( JOINEDNEWVAR, 5-4-3 ) { - message( "FAILED: member [$$JOINEDNEWVAR != 5-4-3]" ) -} diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index 8d7f7bbc68..da5314c83b 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -60,12 +60,6 @@ private slots: void simple_dll(); void subdirs(); void subdir_via_pro_file_extra_target(); - void functions(); - void operators(); - void variables(); - void func_export(); - void func_variables(); - void comments(); void duplicateLibraryEntries(); void export_across_file_boundaries(); void include_dir(); @@ -80,11 +74,9 @@ private slots: #if defined(Q_OS_MAC) void bundle_spaces(); #endif - void includefunction(); void substitutes(); void project(); void proFileCache(); - void json(); private: TestCompiler test_compiler; @@ -253,43 +245,6 @@ void tst_qmake::subdir_via_pro_file_extra_target() QVERIFY( test_compiler.make( workDir, "extratarget" )); } -void tst_qmake::functions() -{ - QString workDir = base_path + "/testdata/functions"; - QString buildDir = base_path + "/testdata/functions_build"; - QVERIFY( test_compiler.qmake( workDir, "functions", buildDir )); -} - -void tst_qmake::operators() -{ - QString workDir = base_path + "/testdata/operators"; - QVERIFY( test_compiler.qmake( workDir, "operators" )); -} - -void tst_qmake::variables() -{ - QString workDir = base_path + "/testdata/variables"; - QVERIFY(test_compiler.qmake( workDir, "variables" )); -} - -void tst_qmake::func_export() -{ - QString workDir = base_path + "/testdata/func_export"; - QVERIFY(test_compiler.qmake( workDir, "func_export" )); -} - -void tst_qmake::func_variables() -{ - QString workDir = base_path + "/testdata/func_variables"; - QVERIFY(test_compiler.qmake( workDir, "func_variables" )); -} - -void tst_qmake::comments() -{ - QString workDir = base_path + "/testdata/comments"; - QVERIFY(test_compiler.qmake( workDir, "comments" )); -} - void tst_qmake::duplicateLibraryEntries() { QVERIFY(true); @@ -490,26 +445,6 @@ void tst_qmake::bundle_spaces() } #endif // defined(Q_OS_MAC) -void tst_qmake::includefunction() -{ - QString workDir = base_path + "/testdata/include_function"; - QRegExp warningMsg("Cannot read .*: No such file or directory"); - QVERIFY(test_compiler.qmake( workDir, "include_existing_file")); - QVERIFY(!test_compiler.commandOutput().contains(warningMsg)); - - // test include() usage on a missing file - test_compiler.clearCommandOutput(); - workDir = base_path + "/testdata/include_function"; - QVERIFY(test_compiler.qmake( workDir, "include_missing_file" )); - QVERIFY(test_compiler.commandOutput().contains(warningMsg)); - - // test include() usage on a missing file when all function parameters are used - test_compiler.clearCommandOutput(); - workDir = base_path + "/testdata/include_function"; - QVERIFY(test_compiler.qmake( workDir, "include_missing_file2" )); - QVERIFY(test_compiler.commandOutput().contains(warningMsg)); -} - void tst_qmake::substitutes() { QString workDir = base_path + "/testdata/substitutes"; @@ -555,33 +490,5 @@ void tst_qmake::proFileCache() QVERIFY( test_compiler.qmake( workDir, "pro_file_cache" )); } -void tst_qmake::json() -{ - QString workDir = base_path + "/testdata/json"; - QVERIFY( test_compiler.qmake( workDir, "json.pro" )); - QString output = test_compiler.commandOutput(); - - // all keys - QVERIFY(output.contains("json._KEYS_ array false null number object string true")); - // array - QVERIFY(output.contains("json.array._KEYS_ 0 1 2")); - QVERIFY(output.contains("json.array.0 arrayItem1")); - QVERIFY(output.contains("json.array.1 arrayItem2")); - QVERIFY(output.contains("json.array.2 arrayItem3")); - // object - QVERIFY(output.contains("json.object._KEYS_ key1 key2")); - QVERIFY(output.contains("json.object.key1 objectValue1")); - QVERIFY(output.contains("json.object.key1 objectValue1")); - // value types - QVERIFY(output.contains("json.string: test string")); - QVERIFY(output.contains("json.number: 999")); - QVERIFY(output.contains("json.true: true")); - QVERIFY(output.contains("json.false: false")); - QVERIFY(output.contains("json.null:")); - // functional booleans - QVERIFY(output.contains("json.true is true")); - QVERIFY(output.contains("json.false is false")); -} - QTEST_MAIN(tst_qmake) #include "tst_qmake.moc" -- cgit v1.2.3