graphviz: simpler preview-smoke-test.
parent
50759f4bc6
commit
0b5ee9dce8
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue