253253 ));let ;when
254254 (fprintf port ")")
255255 ;; Print output when defined
256- (when (memq '@output (get name '?)) (fprintf port " => %s" (@pretty_print (get name '@output ) t)))
256+ (when (and (memq '@output (get name '?))
257+ (neq (get name '@output ) '__undefined__)
258+ )
259+ (fprintf port " => %s" (@pretty_print (get name '@output ) t)))
257260 (getOutstring port)
258261 ));with ;fun
259262
285288 ;; Print info, warn and error messages when expected
286289 (letseq ( ( assertion (car assertions) )
287290 ( input assertion->body_quoted )
288- ( output (car assertion->body_result) )
291+ ;; Support skipped assertions
292+ ( output (if (neq '\*slotUnbound\* assertion->body_result)
293+ (car assertion->body_result)
294+ assertion->body_expected
295+ ) )
289296 ( info (@nonblankstring ? assertion->info_expected ) )
290297 ( warn (@nonblankstring ? assertion->warn_expected ) )
291298 ( error (@nonblankstring ? assertion->error_expected) )
305312 (fprintf port "<font color='%s'>;%s>%s</font>\n" color prefix (escape (clean_at_sign line)))
306313 ));when ;foreach
307314 );foreach
308- (fprintf port ";> %s\n" (escape (clean_at_sign (@pretty_print output ))))
315+ (unless error
316+ (fprintf port ";> %s\n" (escape (clean_at_sign (@pretty_print output ))))
317+ )
309318 (when (cdr assertions) (newline port))
310319 ));let ;foreach
311320 (fprintf port "</pre>")
315324
316325 (@fun @docgen
317326 ( @key
318- ( files ?type ( string ... ) )
319- ( init ?type string ?def (or (getShellEnvVar "SKILL_SHARP_INIT_COMMAND" ) "") )
320- ( before ?type string ?def (or (getShellEnvVar "SKILL_SHARP_BEFORE_COMMAND") "") )
327+ ( source_files ?type ( string ... ) )
328+ ( test_files ?type ( string ... )|nil ?def nil )
329+ ( init ?type string ?def (or (getShellEnvVar "SKILL_SHARP_INIT_COMMAND" ) "") )
330+ ( before ?type string ?def (or (getShellEnvVar "SKILL_SHARP_BEFORE_COMMAND") "") )
321331 ( track_source
322332 ?type t|nil
323333 ?def (equal "TRUE" (getShellEnvVar "SKILL_SHARP_TRACK_SOURCE"))
@@ -335,13 +345,16 @@ Print associated documentation (as .fnd file content) to stdout."
335345 ?out t|nil
336346 ?global t
337347 (destructuringBind ( functions _variables _scheme _classes @optional _symbols )
338- (@globals ?files files ?before (@str "(progn nil (inSkill (sklint)) {before})") ?init init)
348+ (@globals ?files source_files ?before (@str "(progn nil (inSkill (sklint)) {before})") ?init init)
339349 ;; Load all files containing tests
340350 (@letf ( ( (status keepNLInString ) t )
341351 ( (status saveInlineDoc ) t )
342352 ( (getShellEnvVar "SKILL_SHARP_RUN_TEST") "TRUE" )
343353 )
344- (foreach file files (@load file ?no_reload t))
354+ (foreach files (list source_files test_files)
355+ (foreach file files
356+ (@load file ?no_reload t ?fun 'loadi)
357+ ))
345358 )
346359 ;; Filter and sort functions
347360 (setq functions (setof function functions (and (getd function) (nequal "_" (substring function 1 1)))))
0 commit comments