aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>2016-02-29 14:29:15 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2016-03-13 23:05:09 +0100
commit62b62254c423fe3320a6c59889dd8c9682e75818 (patch)
tree12c42902ba8ae68e9edad584afd6c129f102abce
parent3748854209c4babee317994cc7da7fb5b52e4f80 (diff)
downloadneard-62b62254c423fe3320a6c59889dd8c9682e75818.tar.gz
test: Support arbitrary MIME content
-rwxr-xr-xtest/test-tag6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test-tag b/test/test-tag
index f6c2e40..2a6e96a 100755
--- a/test/test-tag
+++ b/test/test-tag
@@ -22,6 +22,8 @@ write <tag> <type> <...>
Type is MIME, parameters are wifi_wsc <ssid> <passphrase>
If type is MIME, and WiFi AP is open network
Type is MIME, parameters are wifi_wsc <ssid>
+ For MIME with arbitrary content, parameters are:
+ <ContentType> <Content>
For example: # %s write /org/neard/nfc0/tag0 \\
Text UTF-8 en-US hello,NFC!
@@ -31,6 +33,7 @@ For example: # %s write /org/neard/nfc0/tag0 \\
E-Mail test@test.com
MIME wifi_wsc YourAPname passphrase
MIME wifi_wsc YourAPname
+ MIME 'application/octet-stream' 1234
"""
print(text % sys.argv[0])
@@ -95,7 +98,8 @@ def write_mime(args):
data["Passphrase"] = args[2]
else:
- usage()
+ data["MIME"] = args[0]
+ data["MIMEPayload"] = dbus.ByteArray(args[1])
tag.Write(data)