From c9434e4f175f599e038a3e28e8340825697543d0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 23 May 2022 15:22:16 -0700 Subject: snapshot Why the fuck is this so fucking hard? --- app.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'app.lua') diff --git a/app.lua b/app.lua index bb463b7..4b3f1ad 100644 --- a/app.lua +++ b/app.lua @@ -199,10 +199,17 @@ function App.screen.check(y, expected_contents, msg) end function App.run_tests() + local sorted_names = {} for name,binding in pairs(_G) do + if name:find('test_') == 1 then + table.insert(sorted_names, name) + end + end + table.sort(sorted_names) + for _,name in ipairs(sorted_names) do if name:find('test_') == 1 then App.initialize_for_test() - binding() + _G[name]() end end print() -- cgit 1.4.1-2-gfad0