-- 需要真實 UART 硬體才能執行：等待裝置回覆符合特定樣式的一行。
-- (hal_mock 沒有 UART 模擬，本檔只在建置期做語法檢查，不會被實際執行。)
uart.write("PING\n")
local line = uart.expect("^PONG", 2000)
if line == nil then
  fail("no PONG reply within 2000ms")
end
log("info", "uart_expect got: " .. line)
