This commit is contained in:
Alexander Heldt
2025-11-16 15:47:00 +01:00
parent 7a22e0f389
commit 4bacbfe21f
3 changed files with 36 additions and 52 deletions

View File

@@ -3,6 +3,7 @@ import gleeunit
import mpv/control.{type Control}
import mpv/internal.{type Key, Char}
import mpv/internal/control as control_internal
pub fn main() -> Nil {
gleeunit.main()
@@ -22,9 +23,11 @@ pub fn control_from_key_test() {
assert tc.expected == control.from_key(tc.key)
})
}
// pub fn parse_playback_time_test() {
// let json_string =
// "{\"data\":\"123.456789\",\"request_id\":0,\"error\":\"success\"}\n"
// let assert Ok(_) = control.parse_p
// }
pub fn parse_playback_time_test() {
let json_string =
"{\"data\":\"123.456789\",\"request_id\":0,\"error\":\"success\"}\n"
let assert Ok(data) = control_internal.parse_playback_time(json_string)
assert data == 123.456789
}