branch: master commit e09c045db9f319c84d27d996fd5c6337c6e92488 Author: Nicolas Petton <nico...@petton.fr> Commit: Nicolas Petton <nico...@petton.fr>
* packages/stream/tests/stream-tests.el: New tests. --- packages/stream/tests/stream-tests.el | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/packages/stream/tests/stream-tests.el b/packages/stream/tests/stream-tests.el index c7b3057..a59aced 100644 --- a/packages/stream/tests/stream-tests.el +++ b/packages/stream/tests/stream-tests.el @@ -168,5 +168,12 @@ (should (= (seq-length (seq-subseq (stream-range 2 10) 1 3)) 2)) (should (= (seq-elt (seq-subseq (stream-range 2 10) 1 3) 1) 4))) +(ert-deftest stream-rest-should-return-the-empty-stream-at-end-of-stream () + (should (stream-empty-p (stream-rest (stream-rest (stream nil)))))) + +(ert-deftest seq-take-should-not-signal-exceptions-at-end-of-stream () + (should (equal (seq-into-sequence (seq-take (stream (list 1 2 3)) 4)) + '(1 2 3)))) + (provide 'stream-tests) ;;; stream-tests.el ends here