diff options
-rw-r--r-- | FMark/src/Common/Markalc/MarkalcProgram.fs | 4 | ||||
-rw-r--r-- | FMark/src/FMarkCLI/FMarkTests.fs | 4 | ||||
-rwxr-xr-x | build.sh | 20 |
3 files changed, 21 insertions, 7 deletions
diff --git a/FMark/src/Common/Markalc/MarkalcProgram.fs b/FMark/src/Common/Markalc/MarkalcProgram.fs index c759081..89f4129 100644 --- a/FMark/src/Common/Markalc/MarkalcProgram.fs +++ b/FMark/src/Common/Markalc/MarkalcProgram.fs @@ -6,6 +6,6 @@ open MarkalcTest let markalcMain argv = printfn "Running tests..." Expecto.Tests.runTestsInAssembly Expecto.Tests.defaultConfig [||] |> ignore - printfn "Updated TESTS.md document with \'Should pass\' tests." - testMarkdown true + // printfn "Updated TESTS.md document with \'Should pass\' tests." + // testMarkdown true 0 // return an integer exit code diff --git a/FMark/src/FMarkCLI/FMarkTests.fs b/FMark/src/FMarkCLI/FMarkTests.fs index 9f8ea58..f68c840 100644 --- a/FMark/src/FMarkCLI/FMarkTests.fs +++ b/FMark/src/FMarkCLI/FMarkTests.fs @@ -46,7 +46,7 @@ let tests = // PROPERTY BASED TESTS /// Check if markdown output of FMark is the same if passed through FMark again - +(* [<PTests>] let FMarkPropertyTest = testProperty "FMarkPropertyTest" <| fun (s: string) -> @@ -65,4 +65,4 @@ let FMarkPropertyTest = |> splitStr let preprocess1 = str |> (takeEither<<processString Markdown) let preprocess2 = str |> (takeEither<<processString Markdown) |> (takeEither<<processString Markdown<<splitStr) - Expect.equal preprocess1 preprocess2 "" + Expect.equal preprocess1 preprocess2 ""*) @@ -11,7 +11,7 @@ function print_help { echo "" echo "OPTIONS:" echo " -b/--build Build a specific project, can be set to" - echo " fsharp, js, all" + echo " fsharp, js, all, testall" exit 1 } @@ -36,7 +36,7 @@ if [[ -z $BUILD ]]; then BUILD=all fi -if [[ $BUILD != "fsharp" ]] && [[ $BUILD != "js" ]] && [[ $BUILD != "all" ]]; then +if [[ $BUILD != "fsharp" ]] && [[ $BUILD != "js" ]] && [[ $BUILD != "all" ]] && [[ $BUILD != "testall" ]]; then print_help fi @@ -54,7 +54,21 @@ else BASE_DIR=$TRAVIS_BUILD_DIR fi -if [[ $BUILD = "all" ]] || [[ $BUILD = "fsharp" ]]; then +function cd_run_module() { + echo "########## Running $1 module tests ###########" + cd $BASE_DIR/FMark/src/Common/$1 + dotnet build + dotnet run --no-build +} + +if [[ $BUILD = "testall" ]]; then + modules=("Lexer" "TOCite" "Markalc" "Parser" "HTMLGen" "MarkdownGen") + for i in "${modules[@]}"; do + cd_run_module $i + done +fi + +if [[ $BUILD = "testall" ]] || [[ $BUILD = "all" ]] || [[ $BUILD = "fsharp" ]]; then echo "Running F# tests" cd $BASE_DIR/FMark/src/FMarkCLI dotnet build |