Fixup accept extra CR.
This commit is contained in:
@ -103,16 +103,12 @@ e: test-accept
|
||||
in: 1234567890xxxxxx
|
||||
pad 10 accept
|
||||
pad swap type cr
|
||||
out:\ --> 1234567890
|
||||
out:cr!
|
||||
out:cr
|
||||
out: --> 1234567890
|
||||
out: 1234567890
|
||||
in: foo
|
||||
pad 10 accept
|
||||
pad swap type cr
|
||||
out:\ --> foo
|
||||
out:cr!
|
||||
out:cr
|
||||
out: --> foo
|
||||
out: foo
|
||||
;e
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ variable hld
|
||||
( Input )
|
||||
: raw.s depth 0 max for aft sp@ r@ cells - @ . then next ;
|
||||
variable echo -1 echo ! variable arrow -1 arrow ! 0 value wascr
|
||||
: *emit ( n -- ) dup emit 13 = if cr then ;
|
||||
: *emit ( n -- ) dup 13 = if drop cr else emit then ;
|
||||
: ?echo ( n -- ) echo @ if *emit else drop then ;
|
||||
: ?arrow. arrow @ if >r >r raw.s r> r> ." --> " then ;
|
||||
: *key ( -- n )
|
||||
|
||||
@ -45,7 +45,6 @@ variable expect-used variable result-used
|
||||
: result-type ( a n -- ) for aft dup c@ result-emit 1+ then next drop ;
|
||||
: expected ( -- a n ) expect-buffer expect-used @ ;
|
||||
: resulted ( -- a n ) result-buffer result-used @ ;
|
||||
: out:cr! 13 expect-emit ;
|
||||
: out:cr 13 expect-emit nl expect-emit ;
|
||||
: out:\ ( "line" -- ) nl parse expect-type ;
|
||||
: out: ( "line" -- ) out:\ out:cr ;
|
||||
|
||||
Reference in New Issue
Block a user