! Image encode test abstraction :: encode-test ( path image-class -- ) path binary file-contents 1quotation [ binary dup [ path load-image image-class image>stream ] with-output-stream B{ } like ] unit-test ; ! Use it like this in your test "vocab:images/testing/pam/rgba1x1.pam" pam-image encode-test