Merge pull request #6816 from enricosada/fsharp_e2e

add more f# tests
This commit is contained in:
Livar 2017-06-11 18:59:18 -07:00 committed by GitHub
commit 3ea6a6e672
4 changed files with 30 additions and 10 deletions

View file

@ -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
[<EntryPoint>]
let main argv =
printfn "Hello World!"
0

View file

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<!-- Issue: https://github.com/dotnet/sdk/issues/1150 -->
<DisableImplicitPackageTargetFallback>true</DisableImplicitPackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>

View file

@ -37,13 +37,6 @@ namespace Microsoft.DotNet.New.Tests
bool useNuGetConfigForAspNet,
bool skipSpaWebpackSteps)
{
if (language == "F#" && !EnvironmentInfo.HasSharedFramework("netcoreapp1.0"))
{
// F# requires netcoreapp1.0 to be present in order to build
// https://github.com/dotnet/netcorecli-fsc/issues/76
return;
}
string rootPath = TestAssets.CreateTestDirectory(identifier: $"{language}_{projectType}").FullName;
new TestCommand("dotnet") { WorkingDirectory = rootPath }

View file

@ -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();