-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from kwpatrick/fix/149
Fix for issue #149 - Adding F# support for AssemblyInfo generation
- Loading branch information
Showing
3 changed files
with
125 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Nerdbank.GitVersioning.Tasks; | ||
using Xunit; | ||
|
||
namespace NerdBank.GitVersioning.Tests | ||
{ | ||
public class AssemblyInfoTest | ||
{ | ||
[Fact] | ||
public void FSharpGenerator() | ||
{ | ||
var info = new AssemblyVersionInfo(); | ||
info.AssemblyCompany = "company"; | ||
info.AssemblyFileVersion = "1.3.1.0"; | ||
info.AssemblyVersion = "1.3.0.0"; | ||
info.CodeLanguage = "f#"; | ||
|
||
var built = info.BuildCode(); | ||
|
||
var expected = @"//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:4.0.30319.42000 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
namespace AssemblyInfo | ||
[<assembly: System.Reflection.AssemblyVersionAttribute(""1.3.0.0"")>] | ||
[<assembly: System.Reflection.AssemblyFileVersionAttribute(""1.3.1.0"")>] | ||
[<assembly: System.Reflection.AssemblyInformationalVersionAttribute("""")>] | ||
do() | ||
type internal ThisAssembly() = | ||
static member internal AssemblyVersion = ""1.3.0.0"" | ||
static member internal AssemblyFileVersion = ""1.3.1.0"" | ||
static member internal AssemblyCompany = ""company"" | ||
static member internal RootNamespace = """" | ||
do() | ||
"; | ||
Assert.Equal(expected, built); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters