Mercurial > hg > may
changeset 193:bcd837523744
Fix unknown-length input stream (has known length once it's finished)
author | Chris Cannam |
---|---|
date | Mon, 06 May 2013 09:32:58 +0100 |
parents | a6889d4314b1 |
children | 8148422e9102 |
files | yetilab/stream/test/test_filter.yeti |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/yetilab/stream/test/test_filter.yeti Mon May 06 09:23:32 2013 +0100 +++ b/yetilab/stream/test/test_filter.yeti Mon May 06 09:32:58 2013 +0100 @@ -16,7 +16,10 @@ // not known on their underlying streams (ts = filt.truncatedTo n str; if withUnknown then - ts with { get available () = Unknown (); } + ts with + { + get available () = if ts.finished? then Known 0 else Unknown () fi; + } else ts fi);