diff --git a/test/connector/device_name_prefixes_test.dart b/test/connector/device_name_prefixes_test.dart new file mode 100644 index 00000000..4e77aea1 --- /dev/null +++ b/test/connector/device_name_prefixes_test.dart @@ -0,0 +1,17 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/connector/meshcore_uuids.dart'; + +/// #807: the Windows live scan filters advertisers by these name prefixes, +/// because the WinRT watcher ignores the service filter. Offband radios +/// advertise as `Offband-...`, so without that prefix the filter would hide +/// our own radios. Uses only the prefix list, which predates #807. +void main() { + test('Offband radios are recognized by name prefix (#807)', () { + const offbandRadio = 'Offband-MC-Strycher-R1W'; + expect( + MeshCoreUuids.deviceNamePrefixes.any(offbandRadio.startsWith), + isTrue, + reason: 'an Offband radio must not be filtered out of the scan', + ); + }); +}