Add more tests

This commit is contained in:
Evgeny
2025-07-06 07:38:55 +08:00
parent a897f1ed0d
commit c9caad2410
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
local names = { "Test", "Blah", "Works?", "Or not?" }
local colors = { "#FF5733", "#33FF57", "#3357FF", "#FF33A1" }
function on_resume()
ui:show_toast("Called!")
shuffle(names)
shuffle(colors)
ui:show_buttons(names, colors)
end
function on_click(idx)
apps:launch("org.telegram.messenger")
end
function shuffle(t)
for i = #t, 2, -1 do
local j = math.random(1, i)
t[i], t[j] = t[j], t[i]
end
end

View File

@@ -2,5 +2,5 @@ local i = 0
function on_resume()
i = i + 1
ui:show_toast("on_resume called: "..i)
ui:show_text("on_resume called: "..i)
end