From: Samuel Ortiz Date: Wed, 12 Jun 2013 15:07:39 +0000 (+0200) Subject: test: Fix Text NDEF representation X-Git-Tag: 0.12~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a72a0c4ad0bf7e95cf4ecc7f58f885aadf66aebb;p=platform%2Fupstream%2Fneard.git test: Fix Text NDEF representation The Text NDEF representation could be non ASCII strings (UTF-8 or UTF-16) and the dumping scripts need to know about that. Fixes #NFC-48 --- diff --git a/test/dump-record b/test/dump-record index 8cf3cb1..2b7c187 100755 --- a/test/dump-record +++ b/test/dump-record @@ -20,5 +20,8 @@ properties = record.GetProperties() print "[ %s ]" % (sys.argv[1]) for key in properties.keys(): - val = str(properties[key]) - print " %s = %s" % (key, val) + if key in ["Representation"]: + val = unicode(properties[key]) + else: + val = str(properties[key]) + print " %s = %s" % (key, val) diff --git a/test/dump-tag b/test/dump-tag index 8ce8d6b..efdd14f 100755 --- a/test/dump-tag +++ b/test/dump-tag @@ -22,7 +22,10 @@ def extract_record(key, list): print " Record = [ %s ]" % (str(i)) for key in properties.keys(): - val = str(properties[key]) + if key in ["Representation"]: + val = unicode(properties[key]) + else: + val = str(properties[key]) print " %s = %s" % (key, val) tag = dbus.Interface(bus.get_object("org.neard", sys.argv[1]),