From 00eadc6e8f6ce6ab983b570b138c6c61ff6d3b1c Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Fri, 9 Jun 2017 23:09:21 +0200 Subject: [PATCH] test pack command --- .../TestProjects/FSharpTestAppSimple/Program.fs | 10 ++++++++++ .../FSharpTestAppSimple/TestAppSimple.fsproj | 15 +++++++++++++++ test/dotnet-pack.Tests/PackTests.cs | 8 +++++--- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 TestAssets/TestProjects/FSharpTestAppSimple/Program.fs create mode 100644 TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj diff --git a/TestAssets/TestProjects/FSharpTestAppSimple/Program.fs b/TestAssets/TestProjects/FSharpTestAppSimple/Program.fs new file mode 100644 index 000000000..65479d645 --- /dev/null +++ b/TestAssets/TestProjects/FSharpTestAppSimple/Program.fs @@ -0,0 +1,10 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +module ConsoleApplication.Program + +open System + +[] +let main argv = + printfn "Hello World!" + 0 diff --git a/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj b/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj new file mode 100644 index 000000000..e504e9b9d --- /dev/null +++ b/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj @@ -0,0 +1,15 @@ + + + + + netcoreapp2.0 + Exe + + true + + + + + + + diff --git a/test/dotnet-pack.Tests/PackTests.cs b/test/dotnet-pack.Tests/PackTests.cs index 117b6bcc8..cceb09ec1 100644 --- a/test/dotnet-pack.Tests/PackTests.cs +++ b/test/dotnet-pack.Tests/PackTests.cs @@ -157,10 +157,12 @@ namespace Microsoft.DotNet.Tools.Pack.Tests .And.Contain(e => e.FullName == "lib/netstandard1.5/MyLibrary.pdb"); } - [Fact] - public void PackWorksWithLocalProject() + [Theory] + [InlineData("C#", "TestAppSimple")] + [InlineData("F#", "FSharpTestAppSimple")] + public void PackWorksWithLocalProject(string language, string projectName) { - var testInstance = TestAssets.Get("TestAppSimple") + var testInstance = TestAssets.Get(projectName) .CreateInstance() .WithSourceFiles() .WithRestoreFiles();