]> gitweb.factorcode.org Git - factor.git/commitdiff
mason.child: Fix unit test for Windows.
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 11 Jun 2015 00:59:43 +0000 (17:59 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 11 Jun 2015 00:59:43 +0000 (17:59 -0700)
extra/mason/child/child-tests.factor

index cc031173f171464adb9cdc75a895a76f78efe6fd..e6463beb1446ca5fecb9a6fc219c0e41a9ba371d 100644 (file)
@@ -1,27 +1,39 @@
+USING: io io.pathnames kernel mason.child mason.config
+namespaces sequences system tools.test ;
 IN: mason.child.tests
-USING: mason.child mason.config tools.test namespaces io kernel
-sequences system ;
 
 [ { "nmake" "/f" "nmakefile" "x86-32" } ] [
     H{
         { target-os windows }
         { target-cpu x86.32 }
-    } [ make-cmd ] with-variables
+    } [ mason-child-make-cmd ] with-variables
 ] unit-test
 
 [ { "make" "macosx-x86-32" } ] [
     H{
         { target-os macosx }
         { target-cpu x86.32 }
-    } [ make-cmd ] with-variables
+    } [ mason-child-make-cmd ] with-variables
 ] unit-test
 
-[ { "./factor.com" "-i=boot.windows-x86.32.image" "-no-user-init" } ] [
-    H{
-        { target-os windows }
-        { target-cpu x86.32 }
-    } [ boot-cmd ] with-variables
-] unit-test
+! Must be an absolute path on Windows because launch directory
+! is relative to parent directory (instead of current directory).
+
+os windows = [
+    { t } [
+        H{
+            { target-os windows }
+            { target-cpu x86.32 }
+        } [ mason-child-boot-cmd ] with-variables first absolute-path?
+    ] unit-test
+] [
+    [ { "./factor.com" "-i=boot.windows-x86.32.image" "-no-user-init" } ] [
+        H{
+            { target-os windows }
+            { target-cpu x86.32 }
+        } [ mason-child-boot-cmd ] with-variables
+    ] unit-test
+] if
 
 [ [ "Hi" print ] [ drop 3 ] [ 4 ] recover-else ] must-infer