I want to learn fsharp. So I'm looking at exercism.io
In their readme they instruct to use Xamarin Studio for running the test http://exercism.io/languages/fsharp/tests
But I would like to just run the tests from the terminal. The exercises from exercism only include one F# file e.g. HelloWorldTest.fs
.
This answer Running tests on Mac OS X console using mono/nunit-console/4 instructs to run nunit-console
with a .csproj
or .dll
file. But these files are not present in the exercism files. So I'm not clear what to do.
I have install mono using homebrew. How do I run the NUnit test from the terminal in OSX?
To run F# Interactive from the console, run dotnet fsi . You will find dotnet fsi in any . NET SDK. For information about available command-line options, see F# Interactive Options.
F# is supported in the Visual Studio for Mac IDE. Ensure that you have Visual Studio for Mac installed.
You may have to use xbuild on the command line to compile the fsproj file then the resulting dll can be executed with nunit on the commandline also.
If you don't have the fsproj you can use fsharpc on the file directly then call nunit, remembering to use mono to execute nunit.
fsharpc HelloWorldTest.fs
mono nunit-console.exe HelloWorldTest.exe
Sorry am not in a position to test this, but should be something like this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With