[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:39:31 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=2565d5c

The following commit has been merged in the master branch:
commit 2565d5c2f488e25d0962e3f780cf63df8356a114
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Wed Jun 4 09:59:51 2008 +0000

    Added basic conversion testcases, fixes.
---
 src/convert.cpp           |   4 +-
 test/conversions.sh       | 191 ++++++++++++++++++++++++++++++++++++++++++++++
 test/data/conversions.out |  94 +++++++++++++++++++++++
 3 files changed, 287 insertions(+), 2 deletions(-)

diff --git a/src/convert.cpp b/src/convert.cpp
index d3cc7a6..c9cc01e 100644
--- a/src/convert.cpp
+++ b/src/convert.cpp
@@ -1028,7 +1028,7 @@ namespace Exiv2 {
         if (pos == xmpData_->end()) return;
         if (!prepareIptcTarget(to)) return;
 
-        if (pos->typeId() == langAlt) {
+        if (pos->typeId() == langAlt || pos->typeId() == xmpText) {
             std::string value;
             if (!getTextValue(value, pos)) {
 #ifndef SUPPRESS_WARNINGS
@@ -1043,7 +1043,7 @@ namespace Exiv2 {
 
         int count = pos->value().count();
         for (int i = 0; i < count; ++i) {
-            std::string value = pos->value().toString();
+            std::string value = pos->value().toString(i);
             if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
diff --git a/test/conversions.sh b/test/conversions.sh
new file mode 100755
index 0000000..9e1fb6a
--- /dev/null
+++ b/test/conversions.sh
@@ -0,0 +1,191 @@
+#! /bin/sh
+# XMP parser test driver
+
+# ----------------------------------------------------------------------
+# Check if xmpparser-test exists
+if [ ! -e ../samples/xmpparser-test ] ; then
+    echo "xmpparser-test not found. Assuming XMP support is not enabled."
+    exit 0
+fi
+
+# ----------------------------------------------------------------------
+# Setup
+results="./tmp/conversions.out"
+good="./data/conversions.out"
+
+# ----------------------------------------------------------------------
+# Main routine
+(
+binpath="$VALGRIND ../../samples"
+exiv2="$VALGRIND exiv2"
+cd ./tmp
+
+IMG=../data/exiv2-empty.jpg
+
+# 1) Convert Exif ImageDescription to XMP x-default langAlt value
+echo Testcase 1
+echo ==========
+
-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list