diff options
Diffstat (limited to 'tests/auto/tools/qmake/testdata')
-rw-r--r-- | tests/auto/tools/qmake/testdata/functions/functions.pro | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/tools/qmake/testdata/functions/functions.pro b/tests/auto/tools/qmake/testdata/functions/functions.pro index ad66ee863d..1da7fd923b 100644 --- a/tests/auto/tools/qmake/testdata/functions/functions.pro +++ b/tests/auto/tools/qmake/testdata/functions/functions.pro @@ -84,4 +84,18 @@ myTestFunction("oink baa moo") message("FAILED: myTestFunction: $$RESULT") } - +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") |