# HG changeset patch # User Chris Cannam # Date 1367829178 -3600 # Node ID bcd837523744e82445413a5cead7c2369980b309 # Parent a6889d4314b1fe23fba4e63850a3cc81443f7922 Fix unknown-length input stream (has known length once it's finished) diff -r a6889d4314b1 -r bcd837523744 yetilab/stream/test/test_filter.yeti --- 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);