From 51f4f13ecc39316c0115f617729ca699e13893e3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 2 Jun 2022 18:52:49 -0700 Subject: test harness now supports copy/paste --- app.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app.lua') diff --git a/app.lua b/app.lua index ab22311..d7f3c72 100644 --- a/app.lua +++ b/app.lua @@ -178,6 +178,14 @@ function App.screen.draw(obj, x,y) end end +App.clipboard = '' +function App.getClipboardText() + return App.clipboard +end +function App.setClipboardText(s) + App.clipboard = s +end + function App.run_after_textinput(t) App.textinput(t) App.screen.contents = {} @@ -259,4 +267,6 @@ function App.disable_tests() App.screen.draw = love.graphics.draw App.width = function(text) return text:getWidth() end App.open_for_writing = function(filename) return io.open(filename, 'w') end + App.getClipboardText = love.system.getClipboardText + App.setClipboardText = love.system.setClipboardText end -- cgit 1.4.1-2-gfad0