prettyprint: document "~1 more~" behavior (funny because it takes as much as room as... 1 more).
parent
65a79dbe4d
commit
b4018e9296
|
@ -195,7 +195,7 @@ M: tuple pprint*
|
|||
: do-length-limit ( seq -- trimmed n/f )
|
||||
length-limit get dup [
|
||||
over length over [-]
|
||||
dup zero? [ 2drop f ] [ [ head-slice ] dip ] if
|
||||
[ drop f ] [ [ head-slice ] dip ] if-zero
|
||||
] when ;
|
||||
|
||||
: pprint-elements ( seq -- )
|
||||
|
|
|
@ -455,3 +455,13 @@ TUPLE: fo { a intersection{ integer fixnum } initial: 0 } ;
|
|||
] [
|
||||
[ maybe{ maybe{ integer } } . ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
{ "{ 0 1 2 3 4 }" } [
|
||||
[ 5 length-limit [ 5 iota >array pprint ] with-variable ]
|
||||
with-string-writer
|
||||
] unit-test
|
||||
|
||||
{ "{ 0 1 2 3 4 ~1 more~ }" } [
|
||||
[ 5 length-limit [ 6 iota >array pprint ] with-variable ]
|
||||
with-string-writer
|
||||
] unit-test
|
||||
|
|
Loading…
Reference in New Issue