Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example command missing equals in table #21

Open
dingfelder opened this issue Oct 3, 2018 · 2 comments
Open

example command missing equals in table #21

dingfelder opened this issue Oct 3, 2018 · 2 comments

Comments

@dingfelder
Copy link

if you use the example command in the header of a table within markdown e.g
| [run][] [Scenario](- "c:example") | [secondColumn]...

The Intellij IDE is complaining of an error:
Error:(17, 34) '=' expected - this position refers to the closing doublequote after example

Looking at the docs, I see the following code
<div concordion:example="example2">
but that's for html, not markdown. (all the markdown examples I see just say: "c:example")

I tried changing it to:
| [run][] [Scenario](- "c:example=compareSQL") |
But that doesnt help, when I run that test, I get the following exception
Specification has duplicate example: 'compareSQL'

java.lang.Exception: Specification has duplicate example: 'compareSQL'
	at org.junit.runners.model.InitializationError.<init>(InitializationError.java:38)
	at org.concordion.integration.junit4.ConcordionRunner.verifyUniqueExampleMethods(ConcordionRunner.java:100)
@idegtiarenko
Copy link
Member

Hello,

I believe correct ways to declare example are:

## [FirstExample](- "c:example=FirstExample")
Example with command declared
## [SecondExample](- "SecondExample")
Example without command declared

The second part is related to actual specification execution by concordion, not making syntax highlighting in IDE provided by the plugin.
I believe the issue there is that there is another example with same name (compareSQL) defined somewhere on the same specification. Seems like example names should be unique at least across the spec file.

Please let me know if this helps.

@nigelcharman
Copy link
Member

Hi Ievgen

I think the issue is that the plugin does not support running each row of a table as an example in Markdown and possibly HTML. Sorry, it looks like this was added in 2.1.0 and we didn't inform you.

The duplicate example would have happened since it would have tried running multiple rows of the table with the same example name. I'd ignore this part of the issue, since Andy was just trying to workaround the issue.

For the correct ways to declare an example in your comment above, there is another shorthand you can use. To get an example name matching the normalised header text, you can just write:

## [Third Example](-)
Example with name matching normalised header text (eg. third-example for this example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants