]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 4 May 2009 10:16:47 +0000 (05:16 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 4 May 2009 10:16:47 +0000 (05:16 -0500)
1  2 
basis/prettyprint/backend/backend.factor
core/bootstrap/primitives.factor
core/generic/standard/standard.factor
core/io/files/files.factor
core/io/streams/byte-array/byte-array-tests.factor

Simple merge
Simple merge
Simple merge
index 3cf52c6a78dc472f89aaf163619b6d889f4c776f,0000000000000000000000000000000000000000..0cd35dfa213b11583f61ad91958703ffbe53004a
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,29 @@@
- [ { BIN: 101111111000000111111 } t ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 } utf8 <byte-reader> contents dup >array swap string? ] unit-test
 +USING: tools.test io.streams.byte-array io.encodings.binary
 +io.encodings.utf8 io kernel arrays strings namespaces ;
 +
 +[ B{ 1 2 3 } ] [ binary [ B{ 1 2 3 } write ] with-byte-writer ] unit-test
 +[ B{ 1 2 3 } ] [ { 1 2 3 } binary [ 3 read ] with-byte-reader ] unit-test
 +
 +[ B{ BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 BIN: 11101111 BIN: 10000000 BIN: 10111111 BIN: 11011111 BIN: 10000000 CHAR: x } ]
 +[ { BIN: 101111111000000111111 BIN: 1111000000111111 BIN: 11111000000 CHAR: x } >string utf8 [ write ] with-byte-writer ] unit-test
- ] unit-test
++[ { BIN: 101111111000000111111 } t ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 } utf8 <byte-reader> stream-contents dup >array swap string? ] unit-test
 +
 +[ B{ 121 120 } 0 ] [
 +    B{ 0 121 120 0 0 0 0 0 0 } binary
 +    [ 1 read drop "\0" read-until ] with-byte-reader
 +] unit-test
 +
 +[ 1 1 4 11 f ] [
 +    B{ 1 2 3 4 5 6 7 8 9 10 11 12 } binary
 +    [
 +        read1
 +        0 seek-absolute input-stream get stream-seek
 +        read1
 +        2 seek-relative input-stream get stream-seek
 +        read1
 +        -2 seek-end input-stream get stream-seek
 +        read1
 +        0 seek-end input-stream get stream-seek
 +        read1
 +    ] with-byte-reader
++] unit-test