]> gitweb.factorcode.org Git - factor.git/commitdiff
Add testcase for mnestic's deploy bug
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 14 Jan 2009 07:00:54 +0000 (01:00 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 14 Jan 2009 07:00:54 +0000 (01:00 -0600)
basis/tools/deploy/deploy-tests.factor
basis/tools/deploy/test/10/10-tests.factor [new file with mode: 0644]
basis/tools/deploy/test/10/10.factor [new file with mode: 0644]
basis/tools/deploy/test/10/authors.txt [new file with mode: 0644]
basis/tools/deploy/test/10/deploy.factor [new file with mode: 0644]
basis/tools/deploy/test/test.factor [new file with mode: 0644]

index e15ba9b90e8a6bedafbf2778260ff7d43e64e347..8b36947f439921ba0bebaa26220f95406290a2ca 100644 (file)
@@ -3,17 +3,8 @@ USING: tools.test system io.pathnames io.files io.files.info
 io.files.temp kernel tools.deploy.config\r
 tools.deploy.config.editor tools.deploy.backend math sequences\r
 io.launcher arrays namespaces continuations layouts accessors\r
-io.encodings.ascii urls math.parser io.directories ;\r
-\r
-: shake-and-bake ( vocab -- )\r
-    [ "test.image" temp-file delete-file ] ignore-errors\r
-    "resource:" [\r
-        [ vm "test.image" temp-file ] dip\r
-        dup deploy-config make-deploy-image\r
-    ] with-directory ;\r
-\r
-: small-enough? ( n -- ? )\r
-    [ "test.image" temp-file file-info size>> ] [ cell 4 / * ] bi* <= ;\r
+io.encodings.ascii urls math.parser io.directories\r
+tools.deploy.test ;\r
 \r
 [ t ] [ "hello-world" shake-and-bake 500000 small-enough? ] unit-test\r
 \r
@@ -36,11 +27,6 @@ os macosx? [
     [ t ] [ "webkit-demo" shake-and-bake 500000 small-enough? ] unit-test\r
 ] when\r
 \r
-: run-temp-image ( -- )\r
-    vm\r
-    "-i=" "test.image" temp-file append\r
-    2array try-process ;\r
-\r
 {\r
     "tools.deploy.test.1"\r
     "tools.deploy.test.2"\r
@@ -113,3 +99,8 @@ M: quit-responder call-responder*
     "tools.deploy.test.9" shake-and-bake\r
     run-temp-image\r
 ] unit-test\r
+\r
+[ ] [\r
+    "tools.deploy.test.10" shake-and-bake\r
+    run-temp-image\r
+] unit-test\r
diff --git a/basis/tools/deploy/test/10/10-tests.factor b/basis/tools/deploy/test/10/10-tests.factor
new file mode 100644 (file)
index 0000000..ba6f354
--- /dev/null
@@ -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
diff --git a/basis/tools/deploy/test/10/10.factor b/basis/tools/deploy/test/10/10.factor
new file mode 100644 (file)
index 0000000..95329ff
--- /dev/null
@@ -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
\ No newline at end of file
diff --git a/basis/tools/deploy/test/10/authors.txt b/basis/tools/deploy/test/10/authors.txt
new file mode 100644 (file)
index 0000000..d4f5d6b
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
\ No newline at end of file
diff --git a/basis/tools/deploy/test/10/deploy.factor b/basis/tools/deploy/test/10/deploy.factor
new file mode 100644 (file)
index 0000000..3f59406
--- /dev/null
@@ -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" }
+}
diff --git a/basis/tools/deploy/test/test.factor b/basis/tools/deploy/test/test.factor
new file mode 100644 (file)
index 0000000..eb780e4
--- /dev/null
@@ -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 ;
\ No newline at end of file