# smoke.txt - a scripted session for ludic ui-preview (protocol-v1.md), to be run by hand or by a # small driver: `bin/ludic-ui-preview < requests` where the requests are the `> ` lines below, in order. # # > LINE a request, sent as it stands (without the "> ") # < TEXT some reply line of that request contains TEXT (in order within the reply) # <= LINE the request's terminal line is exactly LINE # hello <= ok ui-preview 1 "" "" > viewport 1920 1080 <= ok > native "dial" 40 40 <= ok > load "Pill" "\n

{label}

\n

{pct(0)}

\n \n \n \n \n \n
" ".pill {\n background: #203040;\n padding: 8;\n gap: 4;\n}\np { color: #ff0000; }" model "Pill" {"label": "Food", "n": 0} <= ok > show Pill <= ok > frame 0 < frame 0 < rect < #203040 1 < text < 16 32 #ff0000 1 "Food" < round < #3a3f46 1 < "Go" < native "dial" < end < miss "Pill" "pct" <= ok > calls "Pill" {"pct": [80, 20], "pick": true} <= ok > frame 0.5 < frame 0.5 < "80" < end input key tab <= ok > frame 1 < end <= ok > input key enter <= ok > frame 1.1 < end < call "Pill" "pick" [3] <= ok > input key tab <= ok > frame 1.2 <= ok > input key enter <= ok > frame 1.3 < set "Pill" "n" 2 <= ok > input key tab <= ok > frame 1.4 <= ok > input key enter <= ok > frame 1.5 < emit "close" <= ok > load "Badge" "new" ".b { color: #00ff00; }" <= ok > frame 2 < #00ff00 1 "new" <= ok > tree < node 0 < "root" < "Food" < "go" <= ok > box label < box " < style font-size 16 < style color #ff0000 1 <= ok > rules label < rule "Pill.lss" 6 < "p" < decl "color" "#ff0000" <= ok > box nosuch <= fail "box nosuch: no element has that id or key" > load "Bad" "\n \n" "" < err "Bad.xml" 2 0 ": there is no such element <= ok > atlas "icon" "icons" 4 2 ["tent", "fish"] <= ok > load "Pic" "" "" <= ok > show Pic <= ok > frame 3 < image atlas "icons" 1 < 0.25 0 0.5 0.5 < image path "photo.png" < 0 0 1 1 #ffffff 1 <= ok > frobnicate <= fail "unknown request frobnicate" > <= ok > quit <= ok