summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-12-11 12:08:47 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-12-21 16:34:26 +0000
commit57ca8d2698f1eaf30f1110ba47445c04d2bcd0f7 (patch)
tree847352a4c2e50ec0db2dd1843658c4cd1af96673 /tests
parent6f1b78c980b5250b2bb8408a5fe422997b52eb0e (diff)
make write_file() capable of making files (not) executable
Change-Id: I9ca96bc3408160261781697a3471c1f446c86c3a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index bed4c792a1..beafef5ad2 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -2205,9 +2205,10 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
<< ""
<< true;
+ // FIXME: This also tests that 'exe' is accepted, but does not test whether it actually works.
QTest::newRow("write_file(): append")
<< "VAR = 'one more line'\n"
- "write_file(" + wpath + ", VAR, append): OK = 1\n"
+ "write_file(" + wpath + ", VAR, append exe): OK = 1\n"
"OUT = $$cat(" + wpath + ", lines)"
<< "OK = 1\nOUT = 'other content' 'one more line'"
<< ""
@@ -2227,7 +2228,13 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
QTest::newRow("write_file(): bad number of arguments")
<< "write_file(1, 2, 3, 4): OK = 1"
<< "OK = UNDEF"
- << "##:1: write_file(name, [content var, [append]]) requires one to three arguments."
+ << "##:1: write_file(name, [content var, [append] [exe]]) requires one to three arguments."
+ << true;
+
+ QTest::newRow("write_file(): invalid flag")
+ << "write_file(file, VAR, fail): OK = 1"
+ << "OK = UNDEF"
+ << "##:1: write_file(): invalid flag fail."
<< true;
// FIXME: This doesn't test whether it actually works.