[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepimlibs] syndication/tests: Make test more robust against trailing whitespace in the .expected f
From:       Frank Osterfeld <osterfeld () kde ! org>
Date:       2012-04-04 20:19:30
Message-ID: 20120404201930.D125EA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit bec931b862aab0cb715bfff39cf2d302c2f77bd1 by Frank Osterfeld.
Committed on 04/04/2012 at 22:13.
Pushed by osterfeld into branch 'master'.

Make test more robust against trailing whitespace in the .expected files.

M  +1    -0    syndication/tests/rdf/javaworld.xml.expected
M  +1    -1    syndication/tests/testlibsyndication.cpp

http://commits.kde.org/kdepimlibs/bec931b862aab0cb715bfff39cf2d302c2f77bd1

diff --git a/syndication/tests/rdf/javaworld.xml.expected b/syndication/tests/rdf/javaworld.xml.expected
index 5d3e0aa..0bf40a6 100644
--- a/syndication/tests/rdf/javaworld.xml.expected
+++ b/syndication/tests/rdf/javaworld.xml.expected
@@ -84,3 +84,4 @@ datePublished: #Thu Jan 26 01:00:00 2012#
 dateUpdated: #Thu Jan 26 01:00:00 2012#
 # Item end ########################
 # Feed end ########################
+
diff --git a/syndication/tests/testlibsyndication.cpp b/syndication/tests/testlibsyndication.cpp
index e5913f6..1b90f53 100644
--- a/syndication/tests/testlibsyndication.cpp
+++ b/syndication/tests/testlibsyndication.cpp
@@ -130,7 +130,7 @@ int main(int argc, char **argv)
           expFile.open(QIODevice::ReadOnly);
           QByteArray expected = expFile.readAll();
           expFile.close();
-          return expected == (res.toUtf8() + '\n') ? 0 : 1;
+          return expected.trimmed() == res.toUtf8().trimmed() ? 0 : 1;
     }
     
     return 0;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic