blob: d3b6a80122cdf9cd36824b59c8b39012600c9426 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
---
title: Testing the Rust crate "subplotlib"
bindings:
- subplotlib.yaml
- lib/datadir.yaml
impls:
rust:
- helpers/subplotlib_context.rs
- helpers/subplotlib_impl.rs
...
# Rust library for assisting with running subplots
The `subplotlib` crate is a library which assists with running test suites
generated using the `rust` template from Subplot.
This document is intended to **test** `subplotlib`, not to provide instruction
on how to use it.
# Fundamentals
All fundamental keywords are properly supported in subplotlib and the rust
template.
```scenario
given a counter starting at 0
when the counter is incremented
then the counter is 1
when the counter is incremented
then the counter is 2
```
# Embedded files
You can have files embedded into your subplot tests with the rust codegen
as well.
```{#example.txt .file}
This data file will be embedded into the test suite
```
```scenario
given I have read the file example.txt into EXAMPLE
when I look at EXAMPLE
then I see "will be embedded"
```
# Data directory
There is a data directory, and for now this test will fail if there's not
at least 1 megabyte of space in the data directory
```scenario
given datadir has at least 1024000B of space
and datadir has at least 1M of space
```
|