From 27810a753b1bd945eeda5fd629b5e6b9a4ccd62b Mon Sep 17 00:00:00 2001 From: Repo Assist Date: Sun, 22 Feb 2026 20:03:22 +0000 Subject: [PATCH] Add tests for yield! list<'T> in asyncSeq computation expression Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AsyncSeqTests.fs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/FSharp.Control.AsyncSeq.Tests/AsyncSeqTests.fs b/tests/FSharp.Control.AsyncSeq.Tests/AsyncSeqTests.fs index 5dffd6f..fcf55b2 100644 --- a/tests/FSharp.Control.AsyncSeq.Tests/AsyncSeqTests.fs +++ b/tests/FSharp.Control.AsyncSeq.Tests/AsyncSeqTests.fs @@ -176,6 +176,26 @@ let ``asyncSeq yield! seq combines with other yields``() = let a = s |> AsyncSeq.toListSynchronously Assert.True(([1;2;3;4] = a)) +[] +let ``asyncSeq yield! list works``() = + let items = [1; 2; 3] + let s = asyncSeq { + yield! items + } + let a = s |> AsyncSeq.toListSynchronously + Assert.True(([1;2;3] = a)) + +[] +let ``asyncSeq yield! list combines with other yields``() = + let items = [2; 3] + let s = asyncSeq { + yield 1 + yield! items + yield 4 + } + let a = s |> AsyncSeq.toListSynchronously + Assert.True(([1;2;3;4] = a)) + [] let ``AsyncSeq.concatSeq works``() = let ls = [ [1;2] ; [3;4] ]