Skip to content

Commit

Permalink
Add unit test to cover all comments case
Browse files Browse the repository at this point in the history
  • Loading branch information
ceciliaavila committed Feb 2, 2024
1 parent 56375bc commit 95ca3fb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sections": [],
"content": "> This is a comment\n> This is another comment",
"errors": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> This is a comment
> This is another comment
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@
"errorMsgs": [

],
"contextText": "- Please set {deviceTemperature = thermostat to 72}",
"contextText": " - Please set {deviceTemperature = thermostat to 72}",
"range": {
"Start": {
"Line": 17,
"Character": 4
"Character": 0
},
"End": {
"Line": 17,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
<Folder Include="Parser\" />
</ItemGroup>
<ItemGroup>
<None Update="Fixtures\AllComments.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Fixtures\AllComments.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Fixtures\ImportAllLu.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class LuParserTests
[InlineData("LU_Sections")]
[InlineData("SectionsLU")]
[InlineData("ImportAllLu")]
[InlineData("AllComments")]
public void ParseLuContent(string fileName)
{
// var luContent = "# Help"+ Environment.NewLine + "- help" + Environment.NewLine + "- I need help" + Environment.NewLine + "- please help";
Expand Down

0 comments on commit 95ca3fb

Please sign in to comment.