]> gitweb.factorcode.org Git - factor.git/commitdiff
system: these words can't be foldable
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 16 Mar 2016 15:18:23 +0000 (16:18 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 16 Mar 2016 15:18:23 +0000 (16:18 +0100)
Because they will return new values if you update the VM.

core/system/system-tests.factor [new file with mode: 0644]
core/system/system.factor

diff --git a/core/system/system-tests.factor b/core/system/system-tests.factor
new file mode 100644 (file)
index 0000000..64f8410
--- /dev/null
@@ -0,0 +1,7 @@
+USING: arrays sequences system tools.test ;
+IN: system.tests
+
+{ { t t t } } [
+    vm-version vm-compiler vm-compile-time 3array
+    [ version-info subseq? ] map
+] unit-test
index 5c429d35866d6e68eca2d9422a6e077874e4eca1..2c847a599d70cf6544f07e40441682abde72b712 100644 (file)
@@ -20,20 +20,20 @@ UNION: unix macosx linux ;
 
 : os ( -- class ) \ os get-global ; foldable
 
-: vm-version ( -- string ) \ vm-version get-global ; foldable
+: vm-version ( -- string ) \ vm-version get-global ;
 
-: vm-git-label ( -- string ) \ vm-git-label get-global ; foldable
+: vm-git-label ( -- string ) \ vm-git-label get-global ;
 
 : split-vm-git-label ( -- ref git-id )
-    vm-git-label "-" split1-last ; foldable
+    vm-git-label "-" split1-last ;
 
-: vm-git-ref ( -- string ) split-vm-git-label drop ; foldable
+: vm-git-ref ( -- string ) split-vm-git-label drop ;
 
-: vm-git-id ( -- string ) split-vm-git-label nip ; foldable
+: vm-git-id ( -- string ) split-vm-git-label nip ;
 
-: vm-compiler ( -- string ) \ vm-compiler get-global ; foldable
+: vm-compiler ( -- string ) \ vm-compiler get-global ;
 
-: vm-compile-time ( -- string ) \ vm-compile-time get-global ; foldable
+: vm-compile-time ( -- string ) \ vm-compile-time get-global ;
 
 <PRIVATE