diff --git a/src/FileConventions.Test/DummyFiles/DummyProjectAsync.Console/DummyProjectAsync.Console.fsproj b/src/FileConventions.Test/DummyFiles/DummyProjectAsync.Console/DummyProjectAsync.Console.fsproj new file mode 100644 index 00000000..299cf40e --- /dev/null +++ b/src/FileConventions.Test/DummyFiles/DummyProjectAsync.Console/DummyProjectAsync.Console.fsproj @@ -0,0 +1,12 @@ + + + + Exe + net7.0 + + + + + + + diff --git a/src/FileConventions.Test/DummyFiles/DummyProjectAsync.Console/Program.fs b/src/FileConventions.Test/DummyFiles/DummyProjectAsync.Console/Program.fs new file mode 100644 index 00000000..8f7a5c76 --- /dev/null +++ b/src/FileConventions.Test/DummyFiles/DummyProjectAsync.Console/Program.fs @@ -0,0 +1,4 @@ +async { + do! Async.Sleep(5000) +} |> Async.RunSynchronously +printf "Hello World" diff --git a/src/FileConventions.Test/DummyFiles/DummyProjectAsync/DummyProjectAsync.fsproj b/src/FileConventions.Test/DummyFiles/DummyProjectAsync/DummyProjectAsync.fsproj new file mode 100644 index 00000000..9263cfd6 --- /dev/null +++ b/src/FileConventions.Test/DummyFiles/DummyProjectAsync/DummyProjectAsync.fsproj @@ -0,0 +1,12 @@ + + + + net7.0 + true + + + + + + + diff --git a/src/FileConventions.Test/DummyFiles/DummyProjectAsync/Library.fs b/src/FileConventions.Test/DummyFiles/DummyProjectAsync/Library.fs new file mode 100644 index 00000000..0aa24d06 --- /dev/null +++ b/src/FileConventions.Test/DummyFiles/DummyProjectAsync/Library.fs @@ -0,0 +1,9 @@ +namespace DummyProjectAsync + +module Say = + + let delayedHello name = + async { + do! Async.Sleep(5000) + } |> Async.RunSynchronously + "Delayed Hello" diff --git a/src/FileConventions.Test/FileConventions.Test.fs b/src/FileConventions.Test/FileConventions.Test.fs index ed02423b..7ec15a40 100644 --- a/src/FileConventions.Test/FileConventions.Test.fs +++ b/src/FileConventions.Test/FileConventions.Test.fs @@ -803,3 +803,31 @@ let ConsoleAppConvention4() = ) Assert.That(NotFollowingConsoleAppConvention fileInfo, Is.EqualTo false) + + +[] +let ConsoleAppConvention5() = + let fileInfo = + FileInfo( + Path.Combine( + dummyFilesDirectory.FullName, + "DummyProjectAsync", + "DummyProjectAsync.fsproj" + ) + ) + + Assert.That(NotFollowingConsoleAppConvention fileInfo, Is.EqualTo true) + + +[] +let ConsoleAppConvention6() = + let fileInfo = + FileInfo( + Path.Combine( + dummyFilesDirectory.FullName, + "DummyProjectAsync.Console", + "DummyProjectAsync.Console.fsproj" + ) + ) + + Assert.That(NotFollowingConsoleAppConvention fileInfo, Is.EqualTo false)