]> gitweb.factorcode.org Git - factor.git/commitdiff
timers: add test showing stopping timer doesn't stop a running quotation.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 16 Jan 2019 01:31:14 +0000 (17:31 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 16 Jan 2019 01:31:14 +0000 (17:31 -0800)
basis/timers/timers-tests.factor

index 5abb0023e0fc335304e0472a9f8fb4bda56cac37..ce2a79f83300a215f0e2f54eae70355f8ca567c0 100644 (file)
@@ -37,11 +37,12 @@ threads tools.test tools.time ;
     4 seconds sleep
 ] unit-test
 
-{ { 0 } } [
+{ { 0 } { 1 } } [
     { 0 }
     dup '[ 3 seconds sleep 1 _ set-first ] 1 seconds later
     2 seconds sleep stop-timer
-    1/2 seconds sleep
+    1/2 seconds sleep [ clone ] keep
+    2 seconds sleep clone
 ] unit-test
 
 { { 0 } } [