+: make-unit-test ( answer code -- str )
+ [
+ prepend-lines-with-spaces
+ "{\n" "\n}" surround
+ ] [
+ prepend-lines-with-spaces
+ "[\n" "\n] unit-test\n" surround
+ ] bi* " " glue ;
+
+: scaffold-unit-test ( -- str/f )
+ read-contents dup "" = [
+ drop f
+ ] [
+ [ eval( -- x ) unparse ] keep make-unit-test
+ ] if ;
+
+: scaffold-unit-tests ( -- str )
+ [ scaffold-unit-test ] loop>array "\n\n" join ;
+