blob: 384ee94cb07ce3a51b80a019b6a78546985fbba2 (
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
57
|
# Testing for fable-cat-poc
Essentially we're after checking the following properties:
1. Only fenced code blocks labelled `fable` will be consumed
2. Those code blocks must be at the top level
3. Only headers at the top level will be consumed
4. A header which is at the same or a higher level than the last scenario
will be used to indicate the end of a scenario
5. Only the header for the scenario will be output
6. The code blocks for a scenario will be merged by the test tool
# First example
```fable
This content doesn't matter for now
```
# Second example
## Second layer
```fable
This content also doesn't matter for now
```
## Third example
```fable
This is a third unimportant block of text
```
### This header is ignored
#### This header is also ignored
### Despite being higher than the above, this header doesn't stop the scenario
- # This is a top level header yet is ignored by fable.
> # Block quoted header ignored
```fable
This block is a part of the third example
```
# This header stopped the above fable
## This header is used as the fourth fable scenario name
```fable
A fourth irrelevant block of text
```
- ```fable
Despite being a fenced block, this is ignored
```
|