mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-09-26 13:33:27 -04:00
a9ce423bdc
CLOSES #1275, CLOSES #1295, CLOSES #1384, CLOSES #1628, CLOSES #1677, CLOSES #1682, CLOSES #1691, CLOSES #1813, CLOSES #1822, CLOSES #1861, CLOSES #1867, CLOSES #1868, CLOSES #1869, CLOSES #1870, CLOSES #1871, CLOSES #1872, CLOSES #1874, CLOSES #1876, CLOSES #1878, CLOSES #1880, CLOSES #1881, CLOSES #1882, CLOSES #1884, CLOSES #1885, CLOSES #1886, CLOSES #1887, CLOSES #1888, CLOSES #1889, CLOSES #1890, CLOSES #1891, CLOSES #1892, CLOSES #1893, CLOSES #1894, CLOSES #1895, CLOSES #1896, CLOSES #1899, CLOSES #1900, CLOSES #1901
40 lines
1.4 KiB
Lua
40 lines
1.4 KiB
Lua
-- POKEPORT_DRIVER=tests/drivers/link_addr_entry_bug1295_test.lua POKEPORT_IDENTITY=bug1295 POKEPORT_TOUCH=0 love .
|
|
return function(game)
|
|
local U = dofile("tests/drivers/util.lua")
|
|
local LinkState = require("src.link.LinkState")
|
|
|
|
local function check(label, ok)
|
|
U.log(ok and "PASS" or "FAIL", label)
|
|
return ok
|
|
end
|
|
|
|
check("10.0.0.1 round-trips unpadded",
|
|
LinkState.addrText(LinkState.addrEntry("10.0.0.1")) == "10.0.0.1")
|
|
check("192.168.1.40 does not gain trailing zeroes",
|
|
LinkState.addrText(LinkState.addrEntry("192.168.1.40")) == "192.168.1.40")
|
|
|
|
U.newGame(game)
|
|
U.wait(10)
|
|
|
|
local link = LinkState.new(game)
|
|
link.stage = "addrEntry"
|
|
link.addr = LinkState.addrEntry("10.42.0.1")
|
|
game.stack:push(link)
|
|
U.wait(5)
|
|
|
|
local SHOT_DIR = os.getenv("SHOT_DIR") or "/tmp/shots"
|
|
U.shot(game, SHOT_DIR .. "/bug1295_addr_entry.png")
|
|
U.log("captured", SHOT_DIR .. "/bug1295_addr_entry.png")
|
|
|
|
U.log("ENTER HOST ADDRESS is on screen, seeded with 10.42.0.1 and reading")
|
|
U.log("exactly that, the way the HOSTING screen prints it. Before #1295 it")
|
|
U.log("was twelve fixed digits and the same address read 010.042.000.001.")
|
|
U.log("Left/right walks the slots, up/down cycles 0-9 then '.' then blank,")
|
|
U.log("so a shorter address just leaves the tail slots empty. A on")
|
|
U.log("something that is not a dotted quad says so instead of dialling.")
|
|
|
|
while true do
|
|
coroutine.yield()
|
|
end
|
|
end
|