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

View File

@@ -2,6 +2,7 @@ import gleam/list
import gleeunit
import mpv/control.{type Control}
import mpv/internal/control as control_internal
import mpv/key.{type Key, Char}
pub fn main() -> Nil {
@@ -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
}