diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux.lux | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 04f6bea3f..793fd23b3 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -409,6 +409,13 @@ (/.macro: (identity_macro tokens) (\ meta.monad in tokens)) +(def: crosshair + "This is an arbitrary text whose only purpose is to be found, somewhere, in the source-code.") + +(/.macro: (found_crosshair? tokens lux) + (let [[_ _ source_code] (get@ #.source lux)] + (#.Right [lux (list (code.bit (text.contains? ..crosshair source_code)))]))) + (def: for_macro Test (let [macro (: /.Macro' @@ -429,6 +436,8 @@ (is? (: Any macro)))) (_.cover [/.macro:] (is? expected (..identity_macro expected))) + (_.cover [/.Source] + (..found_crosshair?)) )))) (/.type: for_type/variant |