mirror of
https://github.com/ALLFATHER-BV/wadamesh.git
synced 2026-11-08 09:47:16 +00:00
web/scripts/apps/inputlen.lua + web/scripts/lua-input.wada run against the real LuaAppHost.cpp in the web host build: caps().input_len is true, random(6) stays in 1..6 with every value seen, random(1, 1) is 1, random(5, 3) is in 3..5, random(1) is 1, random() is a raw word; 250 characters typed into wada.ui.input(..., 300) come back whole on Enter, 100 typed with no max_len come back as 63; the full 32-bit range returns integers. The Lua harness mock now mirrors the current host: sys.random with the new ranges (deterministic xorshift32), caps().input / input_len, and wada.ui.input with its argument checks, the 63 default, the 1..2000 clamp and one prompt at a time, answered by answer_input(). Scenarios inputlen_random and inputlen_input run the same app; every store app's scenarios still pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
# wada.ui.input max_len + Enter-is-OK (d9f763a2) and wada.sys.random (882a2046)
|
|
# in the web host build, against the real LuaAppHost.cpp. Install the test app first:
|
|
# mkdir -p "$WADA_DATA_DIR/spiffs/apps" && cp web/scripts/apps/inputlen.lua "$WADA_DATA_DIR/spiffs/apps/"
|
|
# web/build-host/wadamesh-host --headless --script web/scripts/lua-input.wada --shots <dir>
|
|
# Expect: r1 shows "caps().input_len = true" and "random OK"; r3 "max_len 300 -> 250
|
|
# chars, ends '456789'" (typed on the host keyboard, Enter = OK); r5 "default -> 63
|
|
# chars" (100 typed, no max_len); r6 "full range: 100/100 integers" (random over the whole
|
|
# 32-bit range, which divided by zero before LuaRandomRange.h).
|
|
wait 5000
|
|
tap 60 283
|
|
wait 3000
|
|
tap 400 456
|
|
wait 1200
|
|
tap 695 360
|
|
wait 1500
|
|
tap 398 150
|
|
wait 2500
|
|
shot r1-app-open
|
|
tap 66 172
|
|
wait 1200
|
|
type abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij0123456789
|
|
wait 1500
|
|
shot r2-long-typed
|
|
key enter
|
|
wait 1500
|
|
shot r3-long-returned
|
|
tap 194 172
|
|
wait 1200
|
|
type xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxY
|
|
wait 1500
|
|
shot r4-default-typed
|
|
key enter
|
|
wait 1500
|
|
shot r5-default-returned
|
|
tap 322 172
|
|
wait 1500
|
|
shot r6-full-range
|
|
quit
|