From 342c66aae8d1ba558a1152cf190199ac28f2762e Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sat, 28 Sep 2024 17:47:15 +0900 Subject: dbus: replace test suffix * with + Signed-off-by: Ophestra Umiker --- dbus/samples_test.go | 10 +++++----- dbus/testdata/org.chromium.Chromium*.json | 8 -------- dbus/testdata/org.chromium.Chromium+.json | 8 ++++++++ 3 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 dbus/testdata/org.chromium.Chromium*.json create mode 100644 dbus/testdata/org.chromium.Chromium+.json diff --git a/dbus/samples_test.go b/dbus/samples_test.go index 8fde1d77..36a8c9fc 100644 --- a/dbus/samples_test.go +++ b/dbus/samples_test.go @@ -33,7 +33,7 @@ var samples = []dbusTestCase{ }, }, { - "org.chromium.Chromium*", &dbus.Config{ + "org.chromium.Chromium+", &dbus.Config{ See: nil, Talk: []string{"org.freedesktop.Avahi", "org.freedesktop.UPower"}, Own: nil, @@ -141,19 +141,19 @@ func testCaseGenerate() { } // skip already enumerated system bus test - if tc.id[len(tc.id)-1] == '*' { + if tc.id[len(tc.id)-1] == '+' { continue } ftp := [2]dbusTestCase{tc} - // system proxy tests always place directly after its user counterpart with id ending in * - if i+1 < len(testCasesV) && testCasesV[i+1].id[len(testCasesV[i+1].id)-1] == '*' { + // system proxy tests always place directly after its user counterpart with id ending in + + if i+1 < len(testCasesV) && testCasesV[i+1].id[len(testCasesV[i+1].id)-1] == '+' { // attach system bus config ftp[1] = testCasesV[i+1] // check for misplaced/mismatching tests - if ftp[0].wantErr != ftp[1].wantErr || ftp[0].id+"*" != ftp[1].id { + if ftp[0].wantErr != ftp[1].wantErr || ftp[0].id+"+" != ftp[1].id { panic("mismatching session/system pairing") } } diff --git a/dbus/testdata/org.chromium.Chromium*.json b/dbus/testdata/org.chromium.Chromium*.json deleted file mode 100644 index 977c26f5..00000000 --- a/dbus/testdata/org.chromium.Chromium*.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "talk":[ - "org.freedesktop.Avahi", - "org.freedesktop.UPower" - ], - - "filter":true -} \ No newline at end of file diff --git a/dbus/testdata/org.chromium.Chromium+.json b/dbus/testdata/org.chromium.Chromium+.json new file mode 100644 index 00000000..977c26f5 --- /dev/null +++ b/dbus/testdata/org.chromium.Chromium+.json @@ -0,0 +1,8 @@ +{ + "talk":[ + "org.freedesktop.Avahi", + "org.freedesktop.UPower" + ], + + "filter":true +} \ No newline at end of file -- cgit v1.3.1