Add testcase for mnestic's deploy bug
parent
700212c7a4
commit
62976058ee
|
@ -3,17 +3,8 @@ USING: tools.test system io.pathnames io.files io.files.info
|
|||
io.files.temp kernel tools.deploy.config
|
||||
tools.deploy.config.editor tools.deploy.backend math sequences
|
||||
io.launcher arrays namespaces continuations layouts accessors
|
||||
io.encodings.ascii urls math.parser io.directories ;
|
||||
|
||||
: shake-and-bake ( vocab -- )
|
||||
[ "test.image" temp-file delete-file ] ignore-errors
|
||||
"resource:" [
|
||||
[ vm "test.image" temp-file ] dip
|
||||
dup deploy-config make-deploy-image
|
||||
] with-directory ;
|
||||
|
||||
: small-enough? ( n -- ? )
|
||||
[ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;
|
||||
io.encodings.ascii urls math.parser io.directories
|
||||
tools.deploy.test ;
|
||||
|
||||
[ t ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test
|
||||
|
||||
|
@ -36,11 +27,6 @@ os macosx? [
|
|||
[ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test
|
||||
] when
|
||||
|
||||
: run-temp-image ( -- )
|
||||
vm
|
||||
"-i=" "test.image" temp-file append
|
||||
2array try-process ;
|
||||
|
||||
{
|
||||
"tools.deploy.test.1"
|
||||
"tools.deploy.test.2"
|
||||
|
@ -113,3 +99,8 @@ M: quit-responder call-responder*
|
|||
"tools.deploy.test.9" shake-and-bake
|
||||
run-temp-image
|
||||
] unit-test
|
||||
|
||||
[ ] [
|
||||
"tools.deploy.test.10" shake-and-bake
|
||||
run-temp-image
|
||||
] unit-test
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: tools.test tools.deploy.test.10 ;
|
||||
IN: tools.deploy.test.10.tests
|
|
@ -0,0 +1,8 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: prettyprint ;
|
||||
IN: tools.deploy.test.10
|
||||
|
||||
: main ( -- ) C{ 0 1 } pprint ;
|
||||
|
||||
MAIN: main
|
|
@ -0,0 +1 @@
|
|||
Slava Pestov
|
|
@ -0,0 +1,15 @@
|
|||
USING: tools.deploy.config ;
|
||||
H{
|
||||
{ deploy-reflection 3 }
|
||||
{ deploy-unicode? f }
|
||||
{ deploy-io 2 }
|
||||
{ deploy-word-props? f }
|
||||
{ deploy-compiler? f }
|
||||
{ deploy-threads? f }
|
||||
{ deploy-word-defs? f }
|
||||
{ "stop-after-last-window?" t }
|
||||
{ deploy-ui? f }
|
||||
{ deploy-math? t }
|
||||
{ deploy-c-types? f }
|
||||
{ deploy-name "tools.deploy.test.10" }
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
USING: accessors arrays continuations io.directories io.files.info
|
||||
io.files.temp io.launcher kernel layouts math sequences system
|
||||
tools.deploy.backend tools.deploy.config.editor ;
|
||||
IN: tools.deploy.test
|
||||
|
||||
: shake-and-bake ( vocab -- )
|
||||
[ "test.image" temp-file delete-file ] ignore-errors
|
||||
"resource:" [
|
||||
[ vm "test.image" temp-file ] dip
|
||||
dup deploy-config make-deploy-image
|
||||
] with-directory ;
|
||||
|
||||
: small-enough? ( n -- ? )
|
||||
[ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;
|
||||
|
||||
: run-temp-image ( -- )
|
||||
vm
|
||||
"-i=" "test.image" temp-file append
|
||||
2array try-process ;
|
Loading…
Reference in New Issue