Skip to content

Commit abc690b

Browse files
committed
Ensure samples in both tests/ and examples/ parse successfully
1 parent ef95bbe commit abc690b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/parsing/samples.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ use std::path::Path;
33

44
use technique::parsing;
55

6-
#[test]
7-
fn ensure_parse() {
8-
let dir = Path::new("tests/samples/");
9-
6+
fn check_directory(dir: &Path) {
7+
// Ensure the directory exists
108
assert!(dir.exists(), "samples directory missing");
119

1210
let entries = fs::read_dir(dir).expect("Failed to read samples directory");
@@ -49,3 +47,9 @@ fn ensure_parse() {
4947
);
5048
}
5149
}
50+
51+
#[test]
52+
fn ensure_parse() {
53+
check_directory(Path::new("tests/samples/"));
54+
check_directory(Path::new("examples/minimal/"));
55+
}

0 commit comments

Comments
 (0)