fix: Audit-Befunde in Protokoll-Parsing, Error-Handling und Eingabe-Validierung
BragiResponse-Felder korrekt zugeordnet (endpoint=raw[1], command=raw[2], status=raw[3]) gemäß Protokoll-Doku. PropertyNotSupported durch DeviceError ersetzt, parse_response_validated in device.rs aktiviert, flush() mit Iterationslimit gegen Endlosschleifen, Sidetone-Range per clap validiert statt clamp, JSON-Escaping im hidpp-battery-waybar.sh, udev auf uaccess umgestellt. 52 Tests grün.
This commit is contained in:
@@ -37,9 +37,8 @@ fn format_sidetone_value() {
|
||||
#[test]
|
||||
fn format_info_values() {
|
||||
let result = output::format_info(0x1B1C, 0x0A69, 1797, 0);
|
||||
assert!(result.contains("0x1B1C"));
|
||||
assert!(result.contains("0x0A69"));
|
||||
assert!(result.contains("1797.0"));
|
||||
let expected = "Vendor ID: 0x1B1C\nProduct ID: 0x0A69\nFirmware: 1797.0";
|
||||
assert_eq!(result, expected);
|
||||
}
|
||||
|
||||
// Waybar-JSON Tests
|
||||
|
||||
Reference in New Issue
Block a user