summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-03-12 21:03:49 +0100
committerLars Knoll <lars.knoll@nokia.com>2012-03-12 21:03:49 +0100
commitd5098f2802255da10b749b93705084ad1fdfc6a5 (patch)
tree6462008a4ab7d13435d93490fed96c62c516cbdf /tests/auto/tools
parentd5a85940f785459d7b982d5fdf59a9fd18825092 (diff)
parentb5b41c18345719612e5411cc482466d2dbafdaf7 (diff)
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/qmake/testdata/one_space/one_space.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/simple_app.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro6
-rw-r--r--tests/auto/tools/rcc/.gitignore1
-rw-r--r--tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt322
-rw-r--r--tests/auto/tools/rcc/data/binary/aliases.expected4
-rw-r--r--tests/auto/tools/rcc/data/binary/aliases.qrc10
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.de.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.ko.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.locale3
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.qrc30
-rw-r--r--tests/auto/tools/rcc/data/binary/blahblah.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/currentdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/currentdir2.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.de.expected5
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.de_CH.expected6
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.expected4
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.it.expected6
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.locale3
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.qrc30
-rw-r--r--tests/auto/tools/rcc/data/binary/multiple.expected5
-rw-r--r--tests/auto/tools/rcc/data/binary/multiple.qrc10
-rw-r--r--tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/prefixes.expected6
-rw-r--r--tests/auto/tools/rcc/data/binary/prefixes.qrc21
-rw-r--r--tests/auto/tools/rcc/data/binary/search_file.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/simple.expected3
-rw-r--r--tests/auto/tools/rcc/data/binary/simple.qrc7
-rw-r--r--tests/auto/tools/rcc/data/binary/subdir/subdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/german.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/test/test1.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/test/test2.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/testdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/testdir2.txt1
-rw-r--r--tests/auto/tools/rcc/data/images/images.bin.expected (renamed from tests/auto/tools/rcc/data/images.bin.expected)bin663 -> 663 bytes
-rw-r--r--tests/auto/tools/rcc/data/images/images.expected (renamed from tests/auto/tools/rcc/data/images.expected)0
-rw-r--r--tests/auto/tools/rcc/data/images/images.qrc (renamed from tests/auto/tools/rcc/data/images.qrc)0
-rw-r--r--tests/auto/tools/rcc/data/images/images/circle.png (renamed from tests/auto/tools/rcc/data/images/circle.png)bin165 -> 165 bytes
-rw-r--r--tests/auto/tools/rcc/data/images/images/square.png (renamed from tests/auto/tools/rcc/data/images/square.png)bin94 -> 94 bytes
-rw-r--r--tests/auto/tools/rcc/data/images/images/subdir/triangle.png (renamed from tests/auto/tools/rcc/data/images/subdir/triangle.png)bin170 -> 170 bytes
-rw-r--r--tests/auto/tools/rcc/data/parentdir.txt1
-rw-r--r--tests/auto/tools/rcc/rcc.pro7
-rw-r--r--tests/auto/tools/rcc/tst_rcc.cpp212
50 files changed, 746 insertions, 42 deletions
diff --git a/tests/auto/tools/qmake/testdata/one_space/one_space.pro b/tests/auto/tools/qmake/testdata/one_space/one_space.pro
index 247bd27096..c5ffa40742 100644
--- a/tests/auto/tools/qmake/testdata/one_space/one_space.pro
+++ b/tests/auto/tools/qmake/testdata/one_space/one_space.pro
@@ -3,8 +3,3 @@ CONFIG += qt warn_on
SOURCES = main.cpp
TARGET = "one space"
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
index a8c4ad613d..94af3cd3ba 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
+++ b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
@@ -6,8 +6,3 @@ SOURCES = test_file.cpp \
RESOURCES = test.qrc
TARGET = simple_app
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro b/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
index 9af38ecce6..09c18d1631 100644
--- a/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
+++ b/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
@@ -12,8 +12,3 @@ MOC_DIR = tmp
OBJECTS_DIR = tmp
TARGET = simple_dll
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
index f496d5bb8e..4191f142d8 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
@@ -5,8 +5,3 @@ SOURCES = test_file.cpp \
main.cpp
TARGET = simple_app
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
index a54a07a0e7..09c18d1631 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
@@ -1,4 +1,3 @@
-include($(QTDIR)/.qmake.cache)
TEMPLATE = lib
CONFIG += qt warn_on dll
@@ -13,8 +12,3 @@ MOC_DIR = tmp
OBJECTS_DIR = tmp
TARGET = simple_dll
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/rcc/.gitignore b/tests/auto/tools/rcc/.gitignore
index 1da39dbd88..6d81961fdb 100644
--- a/tests/auto/tools/rcc/.gitignore
+++ b/tests/auto/tools/rcc/.gitignore
@@ -1 +1,2 @@
tst_rcc
+data/binary/*.rcc
diff --git a/tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt b/tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt
new file mode 100644
index 0000000000..dcf7937f0a
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt
@@ -0,0 +1 @@
+"This is a korean text file"
diff --git a/tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt b/tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt
new file mode 100644
index 0000000000..bd596cdacd
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt
@@ -0,0 +1,322 @@
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
diff --git a/tests/auto/tools/rcc/data/binary/aliases.expected b/tests/auto/tools/rcc/data/binary/aliases.expected
new file mode 100644
index 0000000000..693b633717
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliases.expected
@@ -0,0 +1,4 @@
+currentdir.txt currentdir.txt
+alias.txt currentdir2.txt
+otheralias.txt blahblah.txt
+alias3 ../parentdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/aliases.qrc b/tests/auto/tools/rcc/data/binary/aliases.qrc
new file mode 100644
index 0000000000..ac049c3e65
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliases.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>currentdir.txt</file>
+ <file alias="alias.txt">currentdir2.txt</file>
+ <file alias="otheralias.txt">blahblah.txt</file>
+ </qresource>
+ <qresource>
+ <file alias="alias3">../parentdir.txt</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.de.expected b/tests/auto/tools/rcc/data/binary/allfeatures.de.expected
new file mode 100644
index 0000000000..fa918d0039
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.de.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt test/german.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected b/tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected
new file mode 100644
index 0000000000..59960d4187
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt aliasdir/compressme.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.expected b/tests/auto/tools/rcc/data/binary/allfeatures.expected
new file mode 100644
index 0000000000..831120c053
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt test/testdir2.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.ko.expected b/tests/auto/tools/rcc/data/binary/allfeatures.ko.expected
new file mode 100644
index 0000000000..80b42c378e
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.ko.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt aliasdir/aliasdir.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.locale b/tests/auto/tools/rcc/data/binary/allfeatures.locale
new file mode 100644
index 0000000000..a6fcbab771
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.locale
@@ -0,0 +1,3 @@
+ko
+de_CH
+de
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.qrc b/tests/auto/tools/rcc/data/binary/allfeatures.qrc
new file mode 100644
index 0000000000..1b88b1f2cd
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.qrc
@@ -0,0 +1,30 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/test/abc/123/+++">
+ <file>currentdir.txt</file>
+ <file>./currentdir2.txt</file>
+ <file>../parentdir.txt</file>
+ <file>subdir/subdir.txt</file>
+ </qresource>
+ <qresource prefix="/">
+ <file>searchpath1/search_file.txt</file>
+ <file>searchpath2/search_file.txt</file>
+ <file>search_file.txt</file>
+ </qresource>
+ <qresource><file>test/testdir.txt</file>
+ <file>otherdir/otherdir.txt</file>
+ <file alias="aliasdir/aliasdir.txt">test/testdir2.txt</file>
+ <file>test/test</file>
+ </qresource>
+ <qresource lang="ko">
+ <file>aliasdir/aliasdir.txt</file>
+ </qresource>
+ <qresource lang="de_CH">
+ <file alias="aliasdir/aliasdir.txt" compress="9" threshold="30">aliasdir/compressme.txt</file>
+ </qresource>
+ <qresource lang="de">
+ <file alias="aliasdir/aliasdir.txt">test/german.txt</file>
+ </qresource>
+ <qresource prefix="withoutslashes">
+ <file>blahblah.txt</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/blahblah.txt b/tests/auto/tools/rcc/data/binary/blahblah.txt
new file mode 100644
index 0000000000..19f0805d8d
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/blahblah.txt
@@ -0,0 +1 @@
+qwerty
diff --git a/tests/auto/tools/rcc/data/binary/currentdir.txt b/tests/auto/tools/rcc/data/binary/currentdir.txt
new file mode 100644
index 0000000000..65f1f43def
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/currentdir.txt
@@ -0,0 +1 @@
+"This is the current dir"
diff --git a/tests/auto/tools/rcc/data/binary/currentdir2.txt b/tests/auto/tools/rcc/data/binary/currentdir2.txt
new file mode 100644
index 0000000000..7d89108011
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/currentdir2.txt
@@ -0,0 +1 @@
+"This is also the current dir"
diff --git a/tests/auto/tools/rcc/data/binary/locale.de.expected b/tests/auto/tools/rcc/data/binary/locale.de.expected
new file mode 100644
index 0000000000..649e56be68
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.de.expected
@@ -0,0 +1,5 @@
+currentdir.txt currentdir.txt
+currentdir2.txt currentdir2.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.de_CH.expected b/tests/auto/tools/rcc/data/binary/locale.de_CH.expected
new file mode 100644
index 0000000000..55b57f44d1
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.de_CH.expected
@@ -0,0 +1,6 @@
+currentdir.txt blahblah.txt
+currentdir2.txt currentdir2.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
+parentdir.txt ../parentdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.expected b/tests/auto/tools/rcc/data/binary/locale.expected
new file mode 100644
index 0000000000..ef693bc41d
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.expected
@@ -0,0 +1,4 @@
+currentdir.txt currentdir.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.it.expected b/tests/auto/tools/rcc/data/binary/locale.it.expected
new file mode 100644
index 0000000000..0a1066e3c4
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.it.expected
@@ -0,0 +1,6 @@
+currentdir.txt currentdir.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
+/root/otherdir/otherdir.txt otherdir/otherdir.txt
+/root/currentdir.txt subdir/subdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.locale b/tests/auto/tools/rcc/data/binary/locale.locale
new file mode 100644
index 0000000000..828b9e437c
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.locale
@@ -0,0 +1,3 @@
+de
+de_CH
+it
diff --git a/tests/auto/tools/rcc/data/binary/locale.qrc b/tests/auto/tools/rcc/data/binary/locale.qrc
new file mode 100644
index 0000000000..6cef47b3a2
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.qrc
@@ -0,0 +1,30 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>currentdir.txt</file>
+ </qresource>
+
+ <qresource lang="de"> <file>currentdir2.txt</file> </qresource>
+ <qresource lang="de_CH"> <file>../parentdir.txt</file>
+ <file alias="currentdir.txt">blahblah.txt</file>
+ </qresource>
+
+ <qresource><file>search_file.txt</file></qresource>
+
+ <qresource prefix="/root/">
+
+ <file>test/testdir.txt</file>
+
+ </qresource>
+
+ <qresource>
+ <file>test/testdir2.txt</file>
+ </qresource>
+
+ <qresource prefix="/root/" lang="it">
+ <file>otherdir/otherdir.txt</file>
+ <file alias="currentdir.txt">subdir/subdir.txt</file>
+
+ </qresource>
+
+
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/multiple.expected b/tests/auto/tools/rcc/data/binary/multiple.expected
new file mode 100644
index 0000000000..6515e292f6
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/multiple.expected
@@ -0,0 +1,5 @@
+blahblah.txt blahblah.txt
+currentdir.txt currentdir.txt
+currentdir2.txt currentdir2.txt
+subdir/subdir.txt subdir/subdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/multiple.qrc b/tests/auto/tools/rcc/data/binary/multiple.qrc
new file mode 100644
index 0000000000..80745ac6ad
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/multiple.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>blahblah.txt</file>
+ <file>currentdir.txt</file>
+ <file>currentdir2.txt</file>
+ </qresource>
+ <qresource><file>subdir/subdir.txt</file></qresource>
+ <qresource><file>otherdir/</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt b/tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt
new file mode 100644
index 0000000000..e1b430f33b
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt
@@ -0,0 +1 @@
+"This is the other dir"
diff --git a/tests/auto/tools/rcc/data/binary/prefixes.expected b/tests/auto/tools/rcc/data/binary/prefixes.expected
new file mode 100644
index 0000000000..db07fecbbe
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/prefixes.expected
@@ -0,0 +1,6 @@
+blahblah.txt blahblah.txt
+/myroot/currentdir.txt currentdir.txt
+/myroot/currentdir2.txt currentdir2.txt
+/anotherroot/aliased.txt search_file.txt
+/anotherroot/parentdir.txt ../parentdir.txt
+/myroot/subdir/subdir.txt subdir/subdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/prefixes.qrc b/tests/auto/tools/rcc/data/binary/prefixes.qrc
new file mode 100644
index 0000000000..db6b15ca0c
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/prefixes.qrc
@@ -0,0 +1,21 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>blahblah.txt</file>
+ </qresource>
+
+ <qresource prefix="/myroot/">
+
+ <file>currentdir.txt</file>
+
+ <file>currentdir2.txt</file>
+
+ </qresource>
+
+ <qresource prefix="/anotherroot/">
+
+ <file alias="aliased.txt">search_file.txt</file>
+ <file>../parentdir.txt</file></qresource>
+
+ <qresource prefix="/myroot"><file>subdir/subdir.txt</file></qresource>
+
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/search_file.txt b/tests/auto/tools/rcc/data/binary/search_file.txt
new file mode 100644
index 0000000000..d8649da39d
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/search_file.txt
@@ -0,0 +1 @@
+root
diff --git a/tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt b/tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt
new file mode 100644
index 0000000000..3f31b59496
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt
@@ -0,0 +1 @@
+path1
diff --git a/tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt b/tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt
new file mode 100644
index 0000000000..8e3be1fa2e
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt
@@ -0,0 +1 @@
+path2
diff --git a/tests/auto/tools/rcc/data/binary/simple.expected b/tests/auto/tools/rcc/data/binary/simple.expected
new file mode 100644
index 0000000000..913a33ca46
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/simple.expected
@@ -0,0 +1,3 @@
+blahblah.txt blahblah.txt
+currentdir.txt currentdir.txt
+currentdir2.txt currentdir2.txt
diff --git a/tests/auto/tools/rcc/data/binary/simple.qrc b/tests/auto/tools/rcc/data/binary/simple.qrc
new file mode 100644
index 0000000000..0d4da1909f
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/simple.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>blahblah.txt</file>
+ <file>currentdir.txt</file>
+ <file>currentdir2.txt</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/subdir/subdir.txt b/tests/auto/tools/rcc/data/binary/subdir/subdir.txt
new file mode 100644
index 0000000000..4506acf413
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/subdir/subdir.txt
@@ -0,0 +1 @@
+"This is in the sub directory"
diff --git a/tests/auto/tools/rcc/data/binary/test/german.txt b/tests/auto/tools/rcc/data/binary/test/german.txt
new file mode 100644
index 0000000000..12b1cb7320
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/german.txt
@@ -0,0 +1 @@
+Deutsch
diff --git a/tests/auto/tools/rcc/data/binary/test/test/test1.txt b/tests/auto/tools/rcc/data/binary/test/test/test1.txt
new file mode 100644
index 0000000000..8baef1b4ab
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/test/test1.txt
@@ -0,0 +1 @@
+abc
diff --git a/tests/auto/tools/rcc/data/binary/test/test/test2.txt b/tests/auto/tools/rcc/data/binary/test/test/test2.txt
new file mode 100644
index 0000000000..24c5735c3e
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/test/test2.txt
@@ -0,0 +1 @@
+def
diff --git a/tests/auto/tools/rcc/data/binary/test/testdir.txt b/tests/auto/tools/rcc/data/binary/test/testdir.txt
new file mode 100644
index 0000000000..b8cb3a8c01
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/testdir.txt
@@ -0,0 +1 @@
+"This is in the test directory"
diff --git a/tests/auto/tools/rcc/data/binary/test/testdir2.txt b/tests/auto/tools/rcc/data/binary/test/testdir2.txt
new file mode 100644
index 0000000000..dccfdc9bcf
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/testdir2.txt
@@ -0,0 +1 @@
+"This is another file in this directory"
diff --git a/tests/auto/tools/rcc/data/images.bin.expected b/tests/auto/tools/rcc/data/images/images.bin.expected
index cb67a25477..cb67a25477 100644
--- a/tests/auto/tools/rcc/data/images.bin.expected
+++ b/tests/auto/tools/rcc/data/images/images.bin.expected
Binary files differ
diff --git a/tests/auto/tools/rcc/data/images.expected b/tests/auto/tools/rcc/data/images/images.expected
index 71be819310..71be819310 100644
--- a/tests/auto/tools/rcc/data/images.expected
+++ b/tests/auto/tools/rcc/data/images/images.expected
diff --git a/tests/auto/tools/rcc/data/images.qrc b/tests/auto/tools/rcc/data/images/images.qrc
index 773baef3e5..773baef3e5 100644
--- a/tests/auto/tools/rcc/data/images.qrc
+++ b/tests/auto/tools/rcc/data/images/images.qrc
diff --git a/tests/auto/tools/rcc/data/images/circle.png b/tests/auto/tools/rcc/data/images/images/circle.png
index dc392cb3f7..dc392cb3f7 100644
--- a/tests/auto/tools/rcc/data/images/circle.png
+++ b/tests/auto/tools/rcc/data/images/images/circle.png
Binary files differ
diff --git a/tests/auto/tools/rcc/data/images/square.png b/tests/auto/tools/rcc/data/images/images/square.png
index c0fd2d540a..c0fd2d540a 100644
--- a/tests/auto/tools/rcc/data/images/square.png
+++ b/tests/auto/tools/rcc/data/images/images/square.png
Binary files differ
diff --git a/tests/auto/tools/rcc/data/images/subdir/triangle.png b/tests/auto/tools/rcc/data/images/images/subdir/triangle.png
index 2ee15f8f1f..2ee15f8f1f 100644
--- a/tests/auto/tools/rcc/data/images/subdir/triangle.png
+++ b/tests/auto/tools/rcc/data/images/images/subdir/triangle.png
Binary files differ
diff --git a/tests/auto/tools/rcc/data/parentdir.txt b/tests/auto/tools/rcc/data/parentdir.txt
new file mode 100644
index 0000000000..da8195e17b
--- /dev/null
+++ b/tests/auto/tools/rcc/data/parentdir.txt
@@ -0,0 +1 @@
+abcdefgihklmnopqrstuvwxyz
diff --git a/tests/auto/tools/rcc/rcc.pro b/tests/auto/tools/rcc/rcc.pro
index ebe36cfaff..264b8ecc66 100644
--- a/tests/auto/tools/rcc/rcc.pro
+++ b/tests/auto/tools/rcc/rcc.pro
@@ -3,10 +3,3 @@ QT = core testlib
TARGET = tst_rcc
SOURCES += tst_rcc.cpp
-
-wince* {
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp
index 0124b580a8..dbf5cebd9d 100644
--- a/tests/auto/tools/rcc/tst_rcc.cpp
+++ b/tests/auto/tools/rcc/tst_rcc.cpp
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
@@ -39,28 +40,34 @@
**
****************************************************************************/
+#include <QtTest/QtTest>
+#include <QtCore/QString>
#include <QtCore/QCoreApplication>
#include <QtCore/QByteArray>
-#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QProcess>
-#include <QtCore/QTimer>
-
-#include <QtTest/QtTest>
+#include <QtCore/QDirIterator>
+#include <QtCore/QMap>
+#include <QtCore/QList>
+#include <QtCore/QResource>
+#include <QtCore/QLocale>
+typedef QMap<QString, QString> QStringMap;
+Q_DECLARE_METATYPE(QStringMap)
class tst_rcc : public QObject
{
Q_OBJECT
-public:
- tst_rcc() {}
private slots:
void rcc_data();
void rcc();
-};
+ void binary_data();
+ void binary();
+ void cleanupTestCase();
+};
QString findExpectedFile(const QString &base)
{
@@ -95,14 +102,16 @@ static QString doCompare(const QStringList &actual, const QStringList &expected)
return ba;
}
-
void tst_rcc::rcc_data()
{
QTest::addColumn<QString>("directory");
QTest::addColumn<QString>("qrcfile");
QTest::addColumn<QString>("expected");
- QTest::newRow("images") << SRCDIR "data" << "images.qrc" << "images.expected";
+ QString dataPath = QFINDTESTDATA("data/images/");
+ if (dataPath.isEmpty())
+ QFAIL("data path not found");
+ QTest::newRow("images") << dataPath << "images.qrc" << "images.expected";
}
void tst_rcc::rcc()
@@ -157,6 +166,191 @@ void tst_rcc::rcc()
+static void createRccBinaryData(const QString &baseDir, const QString &qrcFileName, const QString &rccFileName)
+{
+ QString currentDir = QDir::currentPath();
+ QDir::setCurrent(baseDir);
+
+ QProcess rccProcess;
+ rccProcess.start("rcc", QStringList() << "-binary" << "-o" << rccFileName << qrcFileName);
+ bool ok = rccProcess.waitForFinished();
+ if (!ok) {
+ QString errorString = QString::fromLatin1("Could not start rcc (is it in PATH?): %1").arg(rccProcess.errorString());
+ QFAIL(qPrintable(errorString));
+ }
+
+ QByteArray output = rccProcess.readAllStandardOutput();
+ if (!output.isEmpty()) {
+ QString errorMessage = QString::fromLatin1("rcc stdout: %1").arg(QString::fromLocal8Bit(output));
+ QWARN(qPrintable(errorMessage));
+ }
+
+ output = rccProcess.readAllStandardError();
+ if (!output.isEmpty()) {
+ QString errorMessage = QString::fromLatin1("rcc stderr: %1").arg(QString::fromLocal8Bit(output));
+ QWARN(qPrintable(errorMessage));
+ }
+
+ QDir::setCurrent(currentDir);
+}
+
+static QStringList readLinesFromFile(const QString &fileName)
+{
+ QFile file(fileName);
+
+ bool ok = file.open(QIODevice::ReadOnly | QIODevice::Text);
+ if (!ok)
+ QWARN(qPrintable(QString::fromLatin1("Could not open testdata file %1: %2").arg(fileName, file.errorString())));
+
+ QStringList lines = QString::fromUtf8(file.readAll()).split(QLatin1Char('\n'), QString::SkipEmptyParts);
+ return lines;
+}
+
+static QStringMap readExpectedFiles(const QString &fileName)
+{
+ QStringMap expectedFiles;
+
+ QStringList lines = readLinesFromFile(fileName);
+ foreach (const QString &line, lines) {
+ QString resourceFileName = line.section(QLatin1Char(' '), 0, 0, QString::SectionSkipEmpty);
+ QString actualFileName = line.section(QLatin1Char(' '), 1, 1, QString::SectionSkipEmpty);
+ expectedFiles[resourceFileName] = actualFileName;
+ }
+
+ return expectedFiles;
+}
+
+/*
+ The following test looks for all *.qrc files under data/binary/. For each
+ .qrc file found, these files are processed (assuming the file found is
+ called "base.qrc"):
+
+ - base.qrc : processed by rcc; creates base.rcc
+ - base.locale : (optional) list of locales to test, one per line
+ - base.expected : list of pairs (file path in resource, path to real file),
+ one per line; the pair separated by a whitespace; the paths to real files
+ relative to data/binary/ (for testing the C locale)
+ - base.localeName.expected : for each localeName in the base.locale file,
+ as the above .expected file
+*/
+
+void tst_rcc::binary_data()
+{
+ QTest::addColumn<QString>("resourceFile");
+ QTest::addColumn<QLocale>("locale");
+ QTest::addColumn<QString>("baseDirectory");
+ QTest::addColumn<QStringMap>("expectedFiles");
+
+ QString dataPath = QFINDTESTDATA("data/binary/");
+ if (dataPath.isEmpty())
+ QFAIL("data path not found");
+
+ QDirIterator iter(dataPath, QStringList() << QLatin1String("*.qrc"));
+ while (iter.hasNext())
+ {
+ iter.next();
+ QFileInfo qrcFileInfo = iter.fileInfo();
+ QString absoluteBaseName = QFileInfo(qrcFileInfo.absolutePath(), qrcFileInfo.baseName()).absoluteFilePath();
+ QString rccFileName = absoluteBaseName + QLatin1String(".rcc");
+ createRccBinaryData(dataPath, qrcFileInfo.absoluteFilePath(), rccFileName);
+
+ QString localeFileName = absoluteBaseName + QLatin1String(".locale");
+ QFile localeFile(localeFileName);
+ if (localeFile.exists()) {
+ QStringList locales = readLinesFromFile(localeFileName);
+ foreach (const QString &locale, locales) {
+ QString expectedFileName = QString::fromLatin1("%1.%2.%3").arg(absoluteBaseName, locale, QLatin1String("expected"));
+ QStringMap expectedFiles = readExpectedFiles(expectedFileName);
+ QTest::newRow(qPrintable(qrcFileInfo.baseName() + QLatin1Char('_') + locale)) << rccFileName
+ << QLocale(locale)
+ << dataPath
+ << expectedFiles;
+ }
+ }
+
+ // always test for the C locale as well
+ QString expectedFileName = absoluteBaseName + QLatin1String(".expected");
+ QStringMap expectedFiles = readExpectedFiles(expectedFileName);
+ QTest::newRow(qPrintable(qrcFileInfo.baseName() + QLatin1String("_C"))) << rccFileName
+ << QLocale::c()
+ << dataPath
+ << expectedFiles;
+ }
+}
+
+void tst_rcc::binary()
+{
+ QFETCH(QString, baseDirectory);
+ QFETCH(QString, resourceFile);
+ QFETCH(QLocale, locale);
+ QFETCH(QStringMap, expectedFiles);
+
+ const QString rootPrefix = QLatin1String("/test_root/");
+ const QString resourceRootPrefix = QLatin1Char(':') + rootPrefix;
+
+ QLocale oldDefaultLocale;
+ QLocale::setDefault(locale);
+ QVERIFY(QFile::exists(resourceFile));
+ QVERIFY(QResource::registerResource(resourceFile, rootPrefix));
+
+ { // need to destroy the iterators on the resource, in order to be able to unregister it
+
+ // read all the files inside the resources
+ QDirIterator iter(resourceRootPrefix, QDir::Files, QDirIterator::Subdirectories);
+ QList<QString> filesFound;
+ while (iter.hasNext())
+ filesFound << iter.next();
+
+ // add the test root prefix to the expected file names
+ QList<QString> expectedFileNames = expectedFiles.keys();
+ for (QList<QString>::iterator i = expectedFileNames.begin(); i < expectedFileNames.end(); ++i) {
+ // poor man's canonicalPath, which doesn't work with resources
+ if ((*i).startsWith(QLatin1Char('/')))
+ (*i).remove(0, 1);
+ *i = resourceRootPrefix + *i;
+ }
+
+ // check that we have all (and only) the expected files
+ qSort(filesFound);
+ qSort(expectedFileNames);
+ QCOMPARE(filesFound, expectedFileNames);
+
+ // now actually check the file contents
+ QDir directory(baseDirectory);
+ for (QStringMap::const_iterator i = expectedFiles.constBegin(); i != expectedFiles.constEnd(); ++i) {
+ QString resourceFileName = i.key();
+ QString actualFileName = i.value();
+
+ QFile resourceFile(resourceRootPrefix + resourceFileName);
+ QVERIFY(resourceFile.open(QIODevice::ReadOnly));
+ QByteArray resourceData = resourceFile.readAll();
+ resourceFile.close();
+
+ QFile actualFile(QFileInfo(directory, actualFileName).absoluteFilePath());
+ QVERIFY(actualFile.open(QIODevice::ReadOnly));
+ QByteArray actualData = actualFile.readAll();
+ actualFile.close();
+ QCOMPARE(resourceData, actualData);
+ }
+
+ }
+
+ QVERIFY(QResource::unregisterResource(resourceFile, rootPrefix));
+ QLocale::setDefault(oldDefaultLocale);
+}
+
+
+void tst_rcc::cleanupTestCase()
+{
+ QString dataPath = QFINDTESTDATA("data/binary/");
+ if (dataPath.isEmpty())
+ return;
+ QDir dataDir(dataPath);
+ QFileInfoList entries = dataDir.entryInfoList(QStringList() << QLatin1String("*.rcc"));
+ foreach (const QFileInfo &entry, entries)
+ QFile::remove(entry.absoluteFilePath());
+}
+
QTEST_APPLESS_MAIN(tst_rcc)
#include "tst_rcc.moc"