Skip to content

[4/?] Add ability to run code examples in the playground: Get pony snippets tested with ponyc at CI time #549

@shaedrich

Description

@shaedrich

Part of #340

  • Where do we put the expectations for stdOut, stdErr, and exitCode? Because if we don't do that, only snippets that print to stdOut could be tested. docstring as frontmatter perhaps?
Chapter Snippet stdOut stdErr error line exitCode
Getting started ▸ Hello world hello-world-main.pony Hello, world! n/a n/a 0
Types ▸ Classes classes-swap-values-sugar.pony a = 1, b = 2
a = 2, b = 1
n/a n/a 0
Types ▸ Classes classes-swap-values.pony a = 1, b = 2
a = 2, b = 1
n/a n/a 0
Types ▸ Classes classes-wombat.pony Your default wombat's name is "Fantastibat"
Your hungry wombat's name is "Nomsbat"
n/a n/a 0
Types ▸ Primitives primitives-doors.pony Is door open? false
2 + 3 = 5
n/a n/a 0
Types ▸ Actors actors-sequential.pony This is printed first
This is printed last
n/a n/a 0
Types ▸ Traits and interfaces traits-and-interfaces-multiple-traits.pony Their name is "Bob" and they are not bald n/a n/a 0
Types ▸ Traits and interfaces traits-and-interfaces-nested-traits.pony Their name is "Bob" and they are not bald n/a n/a 0
Types ▸ Traits and interfaces traits-and-interfaces-nominal-and-structural-subtyping.pony Their name is "Bob"
Their name is "Larry"
n/a n/a 0
Types ▸ Traits and interfaces traits-and-interfaces-nominal-subtyping-in-pony.pony Their name is "Larry" n/a n/a 0
Types ▸ Traits traits-and-interfaces-open-world-typing.pony size: 2, space: 8
size: 2, space: 8
size: 3, space: 8
size: 3, space: 4
n/a n/a 0
Types ▸ Traits and interfaces traits-and-interfaces-private-methods.pony n/a interfaces can't have private methods, only traits can 9:11 1?
Types ▸ Traits and interfaces traits-and-interfaces-trait.pony Their name is "Bob" n/a n/a 0
Types ▸ Type aliases type-aliases-enumerations-apply.pony red: #FF0000FF
green: #FF00FF
blue: #FFFF
n/a n/a 0
Types ▸ Type aliases type-aliases-complex-types-trait.pony Bob, aged 42, feels "Great!" n/a n/a 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions