Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regression test
  • Loading branch information
KevinRansom committed Jun 1, 2020
commit fab58a819b001b1cb5e2be48e90a66e308f7e768
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,27 @@ let x =
"
script.Eval(code) |> ignoreValue
Assert.False(foundInner)

[<Test>]
member _.``Script with nuget package that yields out of order dependencies works correctly``() =
// regression test for: https://github.com/dotnet/fsharp/issues/9217

let code = """
#r "nuget: FParsec,1.1.1"

open FParsec

let test p str =
match run p str with
| Success(result, _, _) ->
printfn "Success: %A" result
true
| Failure(errorMsg, _, _) ->
printfn "Failure: %s" errorMsg
false
test pfloat "1.234"
"""
use script = new FSharpScript(additionalArgs=[|"/langversion:preview"|])
let opt = script.Eval(code) |> getValue
let value = opt.Value
Assert.AreEqual(true, value.ReflectionValue :?> bool)