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