From 610ded6164037654e60a2d442e4d05d350afa35a Mon Sep 17 00:00:00 2001 From: omaus Date: Wed, 13 Mar 2024 17:02:33 +0100 Subject: [PATCH] Try adjust tests for Unix OS --- tests/ARCTokenization.Tests/CodeGenerationTests.fs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ARCTokenization.Tests/CodeGenerationTests.fs b/tests/ARCTokenization.Tests/CodeGenerationTests.fs index 97c1b0b..4c5df1b 100644 --- a/tests/ARCTokenization.Tests/CodeGenerationTests.fs +++ b/tests/ARCTokenization.Tests/CodeGenerationTests.fs @@ -42,10 +42,12 @@ module toSourceCode = [] let ``returns correct source code`` () = - let expected = $"namespace ARCTokenization.StructuralOntology{NewLine}{NewLine} open ControlledVocabulary{NewLine}{NewLine} module Investigation ={NewLine}{NewLine} let Investigation_Metadata = CvTerm.create(\"INVMSO:00000001\", \"Investigation Metadata\", \"INVMSO\"){NewLine}{NewLine} let ONTOLOGY_SOURCE_REFERENCE = CvTerm.create(\"INVMSO:00000002\", \"ONTOLOGY SOURCE REFERENCE\", \"INVMSO\"){NewLine}{NewLine} let Term_Source_Name = CvTerm.create(\"INVMSO:00000003\", \"Term Source Name\", \"INVMSO\")" + let expected = + $"namespace ARCTokenization.StructuralOntology{NewLine}{NewLine} open ControlledVocabulary{NewLine}{NewLine} module Investigation ={NewLine}{NewLine} let Investigation_Metadata = CvTerm.create(\"INVMSO:00000001\", \"Investigation Metadata\", \"INVMSO\"){NewLine}{NewLine} let ONTOLOGY_SOURCE_REFERENCE = CvTerm.create(\"INVMSO:00000002\", \"ONTOLOGY SOURCE REFERENCE\", \"INVMSO\"){NewLine}{NewLine} let Term_Source_Name = CvTerm.create(\"INVMSO:00000003\", \"Term Source Name\", \"INVMSO\")" + |> String.replace "\r" "" let actual = CodeGeneration.toSourceCode "Investigation" InvestigationMetadata.ontology |> String.splitS NewLine |> Array.take 11 - |> String.concat NewLine + |> String.concat "\n" Assert.Equal(expected, actual) \ No newline at end of file