Skip to content

Commit

Permalink
fixes #15
Browse files Browse the repository at this point in the history
 - test suite annotation was not resetting ignore and solo annotations
  • Loading branch information
George Cook committed Oct 1, 2018
1 parent 91871e9 commit e9f42a4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
4 changes: 3 additions & 1 deletion samples/Overview/source/rooibos.cat.brs
Original file line number Diff line number Diff line change
Expand Up @@ -2142,12 +2142,14 @@ function RBS_TS_ProcessSuite(maxLinesWithoutSuiteDirective, supportLegacyTests )
if (isNextTokenNodeTest)
m.nodeTestFileName = nodeTestFileName
m.isNodeTest = true
isNextTokenNodeTest = false
end if
if (isNextTokenIgnore)
m.isIgnored = true
goto exitProcessing
end if
isNextTokenSolo = false
isNextTokenIgnore = false
isNextTokenNodeTest = false
goto exitLoop
else if (RBS_TS_IsTag(line, TAG_IT))
if (not isTestSuite)
Expand Down
4 changes: 2 additions & 2 deletions source/buildinfo.brs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Function BuildDate()
return "Oct 1 2018 19:18:59"
return "Oct 1 2018 19:28:58"
End Function
Function BuildCommit()
return "5f16d0f"
return "91871e9"
End Function
4 changes: 3 additions & 1 deletion source/rooibos.cat.brs
Original file line number Diff line number Diff line change
Expand Up @@ -2142,12 +2142,14 @@ function RBS_TS_ProcessSuite(maxLinesWithoutSuiteDirective, supportLegacyTests )
if (isNextTokenNodeTest)
m.nodeTestFileName = nodeTestFileName
m.isNodeTest = true
isNextTokenNodeTest = false
end if
if (isNextTokenIgnore)
m.isIgnored = true
goto exitProcessing
end if
isNextTokenSolo = false
isNextTokenIgnore = false
isNextTokenNodeTest = false
goto exitLoop
else if (RBS_TS_IsTag(line, TAG_IT))
if (not isTestSuite)
Expand Down
30 changes: 30 additions & 0 deletions source/tests/issue_15_tests_only_on_groups.brs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'ADD '@Only ON NEXT LINE TO TEST
'@TestSuite [RBSA] Rooibos before after tests

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'@It tests one
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

'@Test it one
function RBSA__it_test_one() as void
m.AssertTrue(true)
end function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'@It tests two
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

'@Test it two
function RBSA__it_test_two() as void
m.AssertTrue(true)
end function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'ADD '@Only ON NEXT LINE TO TEST
'@It tests three
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

'@Test it three
function RBSA__it_test_three() as void
m.AssertTrue(true)
end function
7 changes: 5 additions & 2 deletions src/Rooibos_TestSuite.brs
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,17 @@ function RBS_TS_ProcessSuite(maxLinesWithoutSuiteDirective, supportLegacyTests )
if (isNextTokenNodeTest)
m.nodeTestFileName = nodeTestFileName
m.isNodeTest = true
isNextTokenNodeTest = false
end if

if (isNextTokenIgnore)
m.isIgnored = true
goto exitProcessing
end if


isNextTokenSolo = false
isNextTokenIgnore = false
isNextTokenNodeTest = false

goto exitLoop
else if (RBS_TS_IsTag(line, TAG_IT))
if (not isTestSuite)
Expand Down

0 comments on commit e9f42a4

Please sign in to comment.