From af8df0a28dda14219bd2d4abd15846fceac1ea5e Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 4 Jan 2013 14:39:16 +0200 Subject: [PATCH] test: Update test-adapter to deal with the new Alias property --- test/test-adapter | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/test-adapter b/test/test-adapter index 95e6662f4..5deeda484 100755 --- a/test/test-adapter +++ b/test/test-adapter @@ -27,7 +27,8 @@ if (len(args) < 1): print("") print(" address") print(" list") - print(" name [name]") + print(" name") + print(" alias [alias]") print(" powered [on/off]") print(" pairable [on/off]") print(" pairabletimeout [timeout]") @@ -42,11 +43,16 @@ if (args[0] == "address"): sys.exit(0) if (args[0] == "name"): + name = adapter.Get("org.bluez.Adapter1", "Name") + print(name) + sys.exit(0) + +if (args[0] == "alias"): if (len(args) < 2): - name = adapter.Get("org.bluez.Adapter1", "Name") - print(name) + alias = adapter.Get("org.bluez.Adapter1", "Alias") + print(alias) else: - adapter.Set("org.bluez.Adapter1", "Name", args[1]) + adapter.Set("org.bluez.Adapter1", "Alias", args[1]) sys.exit(0) if (args[0] == "list"): -- 2.47.3