rename state-parser:rest to take-rest
parent
7b9a757076
commit
60fb68d1de
|
@ -1,5 +1,5 @@
|
||||||
USING: arrays calendar kernel math sequences tools.test
|
USING: arrays calendar kernel math sequences tools.test
|
||||||
continuations system math.order ;
|
continuations system math.order threads ;
|
||||||
IN: calendar.tests
|
IN: calendar.tests
|
||||||
|
|
||||||
\ time+ must-infer
|
\ time+ must-infer
|
||||||
|
@ -163,3 +163,7 @@ IN: calendar.tests
|
||||||
[ t ] [ 5 months checktime+ ] unit-test
|
[ t ] [ 5 months checktime+ ] unit-test
|
||||||
|
|
||||||
[ t ] [ 5 years checktime+ ] unit-test
|
[ t ] [ 5 years checktime+ ] unit-test
|
||||||
|
|
||||||
|
[ t ] [ now 50 milliseconds sleep now before? ] unit-test
|
||||||
|
[ t ] [ now 50 milliseconds sleep now swap after? ] unit-test
|
||||||
|
[ t ] [ now 50 milliseconds sleep now 50 milliseconds sleep now swapd between? ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: calendar.format calendar kernel math tools.test
|
USING: calendar.format calendar kernel math tools.test
|
||||||
io.streams.string accessors io ;
|
io.streams.string accessors io math.order ;
|
||||||
IN: calendar.format.tests
|
IN: calendar.format.tests
|
||||||
|
|
||||||
[ 0 ] [
|
[ 0 ] [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
USING: kernel multi-methods tools.test math arrays sequences
|
||||||
|
math.order ;
|
||||||
IN: multi-methods.tests
|
IN: multi-methods.tests
|
||||||
USING: kernel multi-methods tools.test math arrays sequences ;
|
|
||||||
|
|
||||||
[ { 1 2 3 4 5 6 } ] [
|
[ { 1 2 3 4 5 6 } ] [
|
||||||
{ 6 4 5 1 3 2 } [ <=> ] topological-sort
|
{ 6 4 5 1 3 2 } [ <=> ] topological-sort
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
USING: tools.test state-parser kernel io strings ascii ;
|
USING: tools.test state-parser kernel io strings ascii ;
|
||||||
|
|
||||||
[ "hello" ] [ "hello" [ rest ] string-parse ] unit-test
|
[ "hello" ] [ "hello" [ take-rest ] string-parse ] unit-test
|
||||||
[ 2 4 ] [ "12\n123" [ rest drop get-line get-column ] string-parse ] unit-test
|
[ 2 4 ] [ "12\n123" [ take-rest drop get-line get-column ] string-parse ] unit-test
|
||||||
[ "hi" " how are you?" ] [ "hi how are you?" [ [ get-char blank? ] take-until rest ] string-parse ] unit-test
|
[ "hi" " how are you?" ] [ "hi how are you?" [ [ get-char blank? ] take-until take-rest ] string-parse ] unit-test
|
||||||
[ "foo" ";bar" ] [ "foo;bar" [ CHAR: ; take-char rest ] string-parse ] unit-test
|
[ "foo" ";bar" ] [ "foo;bar" [ CHAR: ; take-char take-rest ] string-parse ] unit-test
|
||||||
[ "foo " " bar" ] [ "foo and bar" [ "and" take-string rest ] string-parse ] unit-test
|
[ "foo " " bar" ] [ "foo and bar" [ "and" take-string take-rest ] string-parse ] unit-test
|
||||||
[ "baz" ] [ " \n\t baz" [ pass-blank rest ] string-parse ] unit-test
|
[ "baz" ] [ " \n\t baz" [ pass-blank take-rest ] string-parse ] unit-test
|
||||||
|
|
|
@ -99,7 +99,7 @@ SYMBOL: prolog-data
|
||||||
dup slip swap dup [ get-char , ] unless
|
dup slip swap dup [ get-char , ] unless
|
||||||
] skip-until ] "" make nip ; inline
|
] skip-until ] "" make nip ; inline
|
||||||
|
|
||||||
: rest ( -- string )
|
: take-rest ( -- string )
|
||||||
[ f ] take-until ;
|
[ f ] take-until ;
|
||||||
|
|
||||||
: take-char ( ch -- string )
|
: take-char ( ch -- string )
|
||||||
|
|
Loading…
Reference in New Issue