Skip to content

Commit bb96395

Browse files
committed
Add an assertion to the test
1 parent b9b9c78 commit bb96395

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lrpar/cttests/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,14 @@ fn test_grmtools_section_files() {
332332
let out_dir = env::var("OUT_DIR").unwrap();
333333
let cttests_l_glob = format!("{out_dir}/*.l");
334334
let cttests_y_glob = format!("{out_dir}/*.y");
335-
336-
for file_path in glob(&examples_l_glob)
335+
let files = glob(&examples_l_glob)
337336
.unwrap()
338337
.chain(glob(&examples_y_glob).unwrap())
339338
.chain(glob(&cttests_l_glob).unwrap())
340339
.chain(glob(&cttests_y_glob).unwrap())
341-
{
340+
.collect::<Vec<_>>();
341+
assert!(!files.is_empty());
342+
for file_path in files {
342343
let file_path = file_path.unwrap();
343344
let mut s = String::new();
344345
let mut f = File::open(&file_path).unwrap();

0 commit comments

Comments
 (0)