loadFromDevice working

This commit is contained in:
2025-11-25 18:35:00 -07:00
parent 96645cbff3
commit 40c6b0f3e7
2 changed files with 72 additions and 22 deletions

View File

@@ -81,3 +81,29 @@ fn test_set_on_device() -> anyhow::Result<()> {
Ok(())
}
#[test]
fn test_load_from_device() -> anyhow::Result<()> {
let compiled = compile! {
debug
r#"
device airCon = "d0";
let setting = loadFromDevice(airCon, "On");
"#
};
assert_eq!(
compiled,
indoc! {
"
j main
main:
l r15 d0 On
move r8 r15 #setting
"
}
);
Ok(())
}