-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
[4/?] Add ability to run code examples in the playground: Get pony snippets tested with ponyc at CI time #549
Comments
As discussed before and in other PRs, we're mainly concerned with the checking whether something compiles or not (and a regular expression match for the error message in the expected-not-to-compile case). So that approach drastically reduces how much of this expectation information we need to track - we essentially don't need to track anything at all for examples which are expected to compile, and for those which are expected to have a compilation error, we only need a string / regular expression to match against the error output. As for the question of where these expectations should be tracked, I think if they were in Pony docstring of the source files themselves, that would risk confusion for the reader of these snippets in the playground (they might likely ask themselves if these expectations were actually of a part of Pony the language). So that leaves basically two options:
We're not strongly opinionated about these two approaches, but I have a slight preference for the latter. |
Part of #340
stdOut
,stdErr
, andexitCode
? Because if we don't do that, only snippets that print tostdOut
could be tested. docstring as frontmatter perhaps?a = 2, b = 1
a = 2, b = 1
Your hungry wombat's name is "Nomsbat"
2 + 3 = 5
This is printed last
Their name is "Larry"
size: 2, space: 8
size: 3, space: 8
size: 3, space: 4
green: #FF00FF
blue: #FFFF
The text was updated successfully, but these errors were encountered: