summaryrefslogtreecommitdiff
path: root/src/steps.rs
AgeCommit message (Collapse)AuthorFilesLines
2023-12-25feat: typeset scenarios by typesetting stepsLars Wirzenius1-0/+79
Typeset each step in a scenario, including captures in the steps. Previously the scenario was just one <pre> element, now things can be styled with CSS. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-08-12subplot: Enable passing of location into the template expansionDaniel Silverstone1-0/+4
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-08-12steps: Pass location information into scenarios and scenario steps for error ↵Daniel Silverstone1-10/+25
messages Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-06-07feat! don't allow indented scenario stepsLars Wirzenius1-1/+5
Some day we will have syntax for continuing a step to the next line. This change makes it easier to introduce that syntax, without a breaking change. Sponsored-by: author
2023-02-11chore: use variables in Rust format stringsLars Wirzenius1-1/+1
Change this: format!("{}", foo) into this: format!("{foo}") Support for this feature was added in Rust 1.58 (see https://github.com/rust-lang/rust/releases/tag/1.58.0) and in 1.67 clippy suggests about this. Because the new style seems to be where the Rust ecosystem is going, I think Subplot should follow to avoid being needlessly different from most other projects. Sponsored-by: author
2022-05-05refactor: drop the subplot::Result type aliasLars Wirzenius1-2/+5
Replace subplot::Result<T> with Result<T, SubplotError>. I find this now to be clearer, as I don't need to remind myself which Result is being used where. This should not be a breaking change. Sponsored-by: author
2020-11-21chore(src/visitor/structure.rs): push a char instead of push_strLars Wirzenius1-1/+1
Doesn't change the result, but it's cleaner to push a character instead of push_str a single-character string.
2020-06-20test: Ensure that scenario keywords match insensitivelyDaniel Silverstone1-2/+2
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-06-20feat: Scenario keyword caseless matchingDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-09Change: keep actual text of keyword from scenarioLars Wirzenius1-10/+22
The typesetting should preserve the actual keyword or alias in the source. Previously, if source had this: ``` given foo and bar ``` it got typeset as if were: ``` given foo given bar ``` Also, change subplot.md to use alias when possible.
2020-04-19parse: Ensure continuation keywords cannot be used too earlyDaniel Silverstone1-11/+21
We switch from assuming a continuation of `Given` by default to passing Option<StepKind> around and ensuring that we do not succeed in parsing a step if that is None. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-30Refactor: rename OurError to SubplotErrorLars Wirzenius1-2/+2
On consideration, it's a clearer name. I've been trying to avoid using "subplot" in the identifiers, in case we ever have to rename the project again, but I think this is worth it.
2020-03-28Change: use thiserror to simplify errors.rsLars Wirzenius1-2/+2
2020-02-15Add: add support for "and" and "but" keywordsLars Wirzenius1-5/+19
2020-01-08Change: use tera templates for generating Python codeLars Wirzenius1-2/+3
2020-01-06Add: progress reporting in generated test programLars Wirzenius1-0/+18
2019-12-29Refactor: rustfmtLars Wirzenius1-1/+0
2019-12-28Add: missing documentation commentsLars Wirzenius1-0/+5
2019-12-28Fix: nitpicks found by cargo clippyLars Wirzenius1-7/+7
These all seem to make sense to me.
2019-12-28Fix: use of missing_docs directiveLars Wirzenius1-2/+0
2019-12-22Change: add steps to scenariosLars Wirzenius1-1/+1
2019-12-14Refactor: use ? for error result returnLars Wirzenius1-1/+1
2019-12-14Add: UnknownStepKind errorLars Wirzenius1-3/+7
2019-12-14Change: fix or add doc comments everywhereLars Wirzenius1-3/+9
2019-10-27Add: function to parse a scenario stepLars Wirzenius1-0/+54
2019-10-26Add: docstringsLars Wirzenius1-1/+12
2019-10-20Change: make StepKind, ScenarioStep derive useful traitsLars Wirzenius1-1/+2
2019-10-20Add: module for representing parsed scenario stepLars Wirzenius1-0/+30