summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-27 18:48:26 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-27 18:49:42 +0100
commita4538a2532582f4bb1b6e85ed1e125f9c68bb251 (patch)
tree57cb24a3c23abe9298d73bb4a8fe2bc1466b33da /tests
parent22144848655620adf9c5c8fd1abdbbbfef07069e (diff)
downloadqt4-tools-a4538a2532582f4bb1b6e85ed1e125f9c68bb251.tar.gz
don't falsely complain about mismatched codecfortr
normalize the user input first
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp45
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result12
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp45
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result13
10 files changed, 150 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt
new file mode 100644
index 0000000000..feecddace0
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt
@@ -0,0 +1 @@
+lupdate warning: Codec for tr\(\) 'ISO-8859-1' disagrees with existing file's codec 'UTF-8'\. Expect trouble\.
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp
new file mode 100644
index 0000000000..e4210c52df
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+int main(int argc, char **argv)
+{
+ QObject::tr("hi");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro
new file mode 100644
index 0000000000..00a4dc4885
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro
@@ -0,0 +1,4 @@
+SOURCES += main.cpp
+
+TRANSLATIONS = project.ts
+CODECFORTR = latin1
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before
new file mode 100644
index 0000000000..07ad79b824
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result
new file mode 100644
index 0000000000..b6899c162f
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp
new file mode 100644
index 0000000000..e4210c52df
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** 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 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+int main(int argc, char **argv)
+{
+ QObject::tr("hi");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro
new file mode 100644
index 0000000000..4fddb02428
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro
@@ -0,0 +1,4 @@
+SOURCES += main.cpp
+
+TRANSLATIONS = project.ts
+CODECFORTR = latin2
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before
new file mode 100644
index 0000000000..e18e34e0ee
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>ISO-8859-2</defaultcodec>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result
new file mode 100644
index 0000000000..e18e34e0ee
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>ISO-8859-2</defaultcodec>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="44"/>
+ <source>hi</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>