Skip to content

Commit a52fff7

Browse files
committed
Move golden example files to tests/
1 parent 162f8ef commit a52fff7

File tree

6 files changed

+65
-1
lines changed

6 files changed

+65
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
% technique v1
2+
! MIT; © 2024 ACME, Inc
3+
& checklist
4+
5+
making_coffee : Ingredients -> Coffee
6+
7+
# Heading
8+
9+
Ask these questions: are you really sure you want a coffee?
10+
11+
Assuming you do, then:
12+
13+
1. { repeat <making_coffee>(e) ~ cups }
14+
a. First task
15+
b. Second another task
16+
'Yes' | 'No'
17+
2. Do things { exec(
18+
```bash
19+
./stuff
20+
```
21+
) }
22+
23+
another_example(e) : Input -> Output
24+
{
25+
[
26+
"answer" = 42
27+
"Question Time" = "What is the question?"
28+
"timestamp" = now()
29+
"message" = e
30+
"interpolation" = "The value is { e }"
31+
]
32+
}

tests/formatting/golden.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mod examples {
6060
#[test]
6161
fn ensure_identical_output() {
6262
// Read all .tq files from examples/prototype/
63-
let dir = Path::new("examples/golden");
63+
let dir = Path::new("tests/golden/");
6464

6565
// Ensure the directory exists
6666
assert!(dir.exists(), "examples directory missing");
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
% technique v1
2+
! MIT; © 2024 ACME, Inc
3+
& checklist
4+
5+
making_coffee : Ingredients -> Coffee
6+
7+
# Heading
8+
9+
Ask these questions: are you really sure you want a coffee?
10+
11+
Assuming you do, then:
12+
13+
1. { repeat <making_coffee>(e) ~ cups }
14+
a. First task
15+
b. Second another task
16+
'Yes' | 'No'
17+
2. Do things { exec(
18+
```bash
19+
./stuff
20+
```
21+
) }
22+
23+
another_example(e) : Input -> Output
24+
{
25+
[
26+
"answer" = 42
27+
"Question Time" = "What is the question?"
28+
"timestamp" = now()
29+
"message" = e
30+
"interpolation" = "The value is { e }"
31+
]
32+
}

0 commit comments

Comments
 (0)