graphviz: simpler preview-smoke-test.
parent
50759f4bc6
commit
0b5ee9dce8
|
@ -55,10 +55,7 @@ SYMBOLS: supported-layouts supported-formats ;
|
||||||
] with-temp-directory ;
|
] with-temp-directory ;
|
||||||
|
|
||||||
: preview-smoke-test ( graph -- pass? )
|
: preview-smoke-test ( graph -- pass? )
|
||||||
f "pass?" [
|
[ exists? ] with-preview ;
|
||||||
[ exists? "pass?" set ] with-preview
|
|
||||||
"pass?" get
|
|
||||||
] with-variable ;
|
|
||||||
|
|
||||||
: K_n ( n -- graph )
|
: K_n ( n -- graph )
|
||||||
<graph>
|
<graph>
|
||||||
|
|
|
@ -115,16 +115,16 @@ PRIVATE>
|
||||||
[ unsupported-preview-format ]
|
[ unsupported-preview-format ]
|
||||||
} case ;
|
} case ;
|
||||||
|
|
||||||
:: with-preview ( graph quot: ( path -- ) -- )
|
:: with-preview ( graph quot -- )
|
||||||
[
|
[
|
||||||
"preview" ".dot" [| code-file |
|
"preview" ".dot" [| code-file |
|
||||||
"preview" preview-extension [| image-file |
|
"preview" preview-extension [| image-file |
|
||||||
graph code-file ?encoding write-dot
|
graph code-file ?encoding write-dot
|
||||||
code-file image-file try-preview-command
|
code-file image-file try-preview-command
|
||||||
image-file quot call( path -- )
|
image-file quot call
|
||||||
] cleanup-unique-file
|
] cleanup-unique-file
|
||||||
] cleanup-unique-file
|
] cleanup-unique-file
|
||||||
] with-temp-directory ;
|
] with-temp-directory ; inline
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue