Skip to content

Commit

Permalink
Make interactive test return NIHIL for steps
Browse files Browse the repository at this point in the history
  • Loading branch information
hostilefork committed Sep 22, 2023
1 parent c36f2cd commit db201c0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/interactive.test.reb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ steps: [
label: description: bug: _ ; state we need to know about to report error

k: ok: okay: function [
return: <none>
return: [<nihil>]
<with> steps label description bug saved-print-prompt
][
; Console must be started when first OKAY is run, so SYSTEM/CONSOLE should
Expand All @@ -145,7 +145,7 @@ k: ok: okay: function [
print "CONGRATULATIONS, you are all done."
print "Type OKAY to restart the checklist."
steps: head steps
return none
return nihil
]

steps: parse steps [
Expand All @@ -160,11 +160,12 @@ k: ok: okay: function [

print newline
print " (Type OKAY, K, or OK if it works, NOPE if there's a problem)"
return nihil
]


nope: function [
return: <none>
return: [<nihil>]
][
; Always restore the prompt, in case a test changed it.
;
Expand All @@ -186,6 +187,7 @@ nope: function [
]

print " (Then type OKAY to continue)"
return nihil
]


Expand All @@ -200,7 +202,7 @@ print [
]

; !!! This falls through to the console, so that we get things set up like
; `system/console` so we can tweak the prompt, etc. and have all the
; `system.console` so we can tweak the prompt, etc. and have all the
; interactivity the user expects...even if they ran it from `?do=` vs.
; by having a console already and running `do`. At the moment, there's no
; way to communicate back to the caller whether a console is desired or not,
Expand Down

0 comments on commit db201c0

Please sign in to comment.