]> gitweb.factorcode.org Git - factor.git/commitdiff
graphviz: simpler preview-smoke-test.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 19 Mar 2016 20:03:37 +0000 (13:03 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 19 Mar 2016 20:03:37 +0000 (13:03 -0700)
extra/graphviz/graphviz-tests.factor
extra/graphviz/render/render.factor

index 1746c23adc3c6cb3adb5791e0648e4fa94cb9809..ebf1cfbfff7a56ee7ae312fb6ea9b0aa512750a6 100644 (file)
@@ -55,10 +55,7 @@ SYMBOLS: supported-layouts supported-formats ;
     ] with-temp-directory ;
 
 : preview-smoke-test ( graph -- pass? )
-    f "pass?" [
-        [ exists? "pass?" set ] with-preview
-        "pass?" get
-    ] with-variable ;
+    [ exists? ] with-preview ;
 
 : K_n ( n -- graph )
     <graph>
index e013bd6b6ecda71648d6f2eb0e093f23a7615cc6..110092a503c85bd6c1fb3478771f5a761d97de10 100644 (file)
@@ -115,16 +115,16 @@ PRIVATE>
         [ unsupported-preview-format ]
     } case ;
 
-:: with-preview ( graph quot: ( path -- ) -- )
+:: with-preview ( graph quot -- )
     [
         "preview" ".dot" [| code-file |
             "preview" preview-extension [| image-file |
                 graph code-file ?encoding write-dot
                 code-file image-file try-preview-command
-                image-file quot call( path -- )
+                image-file quot call
             ] cleanup-unique-file
         ] cleanup-unique-file
-    ] with-temp-directory ;
+    ] with-temp-directory ; inline
 
 PRIVATE>