From 75cfe40c6c3a59d327cd64628c123238124556dd Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 11 May 2009 17:04:14 -0500 Subject: [PATCH] Add deploy test to ensure game-input works --- basis/tools/deploy/deploy-tests.factor | 6 +++++- basis/tools/deploy/test/8/8.factor | 21 +++++++++++++++++++++ basis/tools/deploy/test/8/deploy.factor | 14 ++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 basis/tools/deploy/test/8/8.factor create mode 100644 basis/tools/deploy/test/8/deploy.factor diff --git a/basis/tools/deploy/deploy-tests.factor b/basis/tools/deploy/deploy-tests.factor index 842faba640..9cf21d1716 100644 --- a/basis/tools/deploy/deploy-tests.factor +++ b/basis/tools/deploy/deploy-tests.factor @@ -97,4 +97,8 @@ M: quit-responder call-responder* shake-and-bake run-temp-image ] curry unit-test -] each \ No newline at end of file +] each + +os windows? os macosx? or [ + [ ] [ "tools.deploy.test.8" shake-and-bake run-temp-image ] unit-test +] when \ No newline at end of file diff --git a/basis/tools/deploy/test/8/8.factor b/basis/tools/deploy/test/8/8.factor new file mode 100644 index 0000000000..ddf08d3654 --- /dev/null +++ b/basis/tools/deploy/test/8/8.factor @@ -0,0 +1,21 @@ +USING: calendar game-input threads ui ui.gadgets.worlds kernel +method-chains system ; +IN: tools.deploy.test.8 + +TUPLE: my-world < world ; + +BEFORE: my-world begin-world drop open-game-input ; + +AFTER: my-world end-world drop close-game-input ; + +: test-game-input ( -- ) + [ + f T{ world-attributes + { world-class my-world } + { title "Test" } + } open-window + 1 seconds sleep + 0 exit + ] with-ui ; + +MAIN: test-game-input \ No newline at end of file diff --git a/basis/tools/deploy/test/8/deploy.factor b/basis/tools/deploy/test/8/deploy.factor new file mode 100644 index 0000000000..1f7fb4d7ee --- /dev/null +++ b/basis/tools/deploy/test/8/deploy.factor @@ -0,0 +1,14 @@ +USING: tools.deploy.config ; +H{ + { deploy-c-types? f } + { deploy-unicode? f } + { deploy-word-defs? f } + { deploy-name "tools.deploy.test.8" } + { "stop-after-last-window?" t } + { deploy-reflection 1 } + { deploy-ui? t } + { deploy-math? t } + { deploy-io 2 } + { deploy-word-props? f } + { deploy-threads? t } +}