[totem-pl-parser] tests: Print the parsed duration if available



commit 1653061b188699eaed8577b1fa3e52c8e3d470ee
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Mar 9 00:40:05 2013 +0100

    tests: Print the parsed duration if available

 plparse/tests/parser.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index 35eee0c..e6dfe4a 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -975,6 +975,18 @@ entry_metadata_foreach (const char *key, const char *value, gpointer data)
                }
                return;
        }
+       if (g_ascii_strcasecmp (key, TOTEM_PL_PARSER_FIELD_STARTTIME) == 0) {
+               gint64 res;
+
+               res = totem_pl_parser_parse_duration (value, option_debug);
+               if (res == -1)
+                       g_message ("\t%s = '%s' (duration parsing failed)", key, value);
+               else
+                       g_message ("\t%s = '%s' (%"G_GINT64_FORMAT" sec)", key, value, res);
+
+               return;
+       }
+
        g_message ("\t%s = '%s'", key, value);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]