Skip to content

Commit 631c248

Browse files
committed
add test for recursive detection
Coverage information suggested that recursive files weren't covered.
1 parent 47a539c commit 631c248

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

tests/example.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ datatest_stable::harness!(
143143
// ---
144144
with_contents::test_artifact_string,
145145
maybe_include_dir!(),
146-
// This regex matches exactly a.txt, b.txt, and c.skip.txt -- this ensures
147-
// that patterns are relative to the include dir and not the crate root
148-
r"^(a|b|c\.skip)\.txt$",
146+
// This regex matches exactly dir/a.txt, b.txt, and c.skip.txt -- this
147+
// ensures that patterns are relative to the include dir and not the crate
148+
// root
149+
r"^(dir/a|b|c\.skip)\.txt$",
149150
// ---
150151
with_contents::test_artifact_utf8_string,
151152
&with_contents::MAYBE_INCLUDE_STATIC, // Test out some combinations with &'static include_dir::Dir.
File renamed without changes.

tests/run_example.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
// SPDX-License-Identifier: MIT OR Apache-2.0
33

44
static EXPECTED_LINES: &[&str] = &[
5-
"datatest-stable::example test_artifact_utf8::a.txt",
5+
"datatest-stable::example test_artifact_utf8::dir/a.txt",
66
"datatest-stable::example test_artifact_utf8::b.txt",
77
"datatest-stable::example test_artifact_utf8::c.skip.txt",
8-
"datatest-stable::example test_artifact::a.txt",
8+
"datatest-stable::example test_artifact::dir/a.txt",
99
"datatest-stable::example test_artifact::b.txt",
10-
"datatest-stable::example with_contents::test_artifact_bytes::a.txt",
10+
"datatest-stable::example with_contents::test_artifact_bytes::dir/a.txt",
1111
"datatest-stable::example with_contents::test_artifact_bytes::b.txt",
1212
"datatest-stable::example with_contents::test_artifact_bytes::c.skip.txt",
13-
"datatest-stable::example with_contents::test_artifact_string::a.txt",
13+
"datatest-stable::example with_contents::test_artifact_string::dir/a.txt",
1414
"datatest-stable::example with_contents::test_artifact_string::b.txt",
1515
"datatest-stable::example with_contents::test_artifact_string::c.skip.txt",
16-
"datatest-stable::example with_contents::test_artifact_utf8_bytes::a.txt",
16+
"datatest-stable::example with_contents::test_artifact_utf8_bytes::dir/a.txt",
1717
"datatest-stable::example with_contents::test_artifact_utf8_bytes::b.txt",
1818
"datatest-stable::example with_contents::test_artifact_utf8_bytes::c.skip.txt",
19-
"datatest-stable::example with_contents::test_artifact_utf8_string::a.txt",
19+
"datatest-stable::example with_contents::test_artifact_utf8_string::dir/a.txt",
2020
"datatest-stable::example with_contents::test_artifact_utf8_string::b.txt",
2121
"datatest-stable::example with_contents::test_artifact_utf8_string::c.skip.txt",
2222
];
@@ -60,29 +60,29 @@ mod unix {
6060
static EXPECTED_UNIX_LINES: &[&str] = &[
6161
"datatest-stable::example test_artifact_utf8::::colon::dir/::.txt",
6262
"datatest-stable::example test_artifact_utf8::::colon::dir/a.txt",
63-
"datatest-stable::example test_artifact_utf8::a.txt",
63+
"datatest-stable::example test_artifact_utf8::dir/a.txt",
6464
"datatest-stable::example test_artifact_utf8::b.txt",
6565
"datatest-stable::example test_artifact_utf8::c.skip.txt",
6666
"datatest-stable::example test_artifact::::colon::dir/::.txt",
6767
"datatest-stable::example test_artifact::::colon::dir/a.txt",
68-
"datatest-stable::example test_artifact::a.txt",
68+
"datatest-stable::example test_artifact::dir/a.txt",
6969
"datatest-stable::example test_artifact::b.txt",
7070
"datatest-stable::example with_contents::test_artifact_bytes::::colon::dir/::.txt",
7171
"datatest-stable::example with_contents::test_artifact_bytes::::colon::dir/a.txt",
72-
"datatest-stable::example with_contents::test_artifact_bytes::a.txt",
72+
"datatest-stable::example with_contents::test_artifact_bytes::dir/a.txt",
7373
"datatest-stable::example with_contents::test_artifact_bytes::b.txt",
7474
"datatest-stable::example with_contents::test_artifact_bytes::c.skip.txt",
75-
"datatest-stable::example with_contents::test_artifact_string::a.txt",
75+
"datatest-stable::example with_contents::test_artifact_string::dir/a.txt",
7676
"datatest-stable::example with_contents::test_artifact_string::b.txt",
7777
"datatest-stable::example with_contents::test_artifact_string::c.skip.txt",
7878
"datatest-stable::example with_contents::test_artifact_utf8_bytes::::colon::dir/::.txt",
7979
"datatest-stable::example with_contents::test_artifact_utf8_bytes::::colon::dir/a.txt",
80-
"datatest-stable::example with_contents::test_artifact_utf8_bytes::a.txt",
80+
"datatest-stable::example with_contents::test_artifact_utf8_bytes::dir/a.txt",
8181
"datatest-stable::example with_contents::test_artifact_utf8_bytes::b.txt",
8282
"datatest-stable::example with_contents::test_artifact_utf8_bytes::c.skip.txt",
8383
"datatest-stable::example with_contents::test_artifact_utf8_string::::colon::dir/::.txt",
8484
"datatest-stable::example with_contents::test_artifact_utf8_string::::colon::dir/a.txt",
85-
"datatest-stable::example with_contents::test_artifact_utf8_string::a.txt",
85+
"datatest-stable::example with_contents::test_artifact_utf8_string::dir/a.txt",
8686
"datatest-stable::example with_contents::test_artifact_utf8_string::b.txt",
8787
"datatest-stable::example with_contents::test_artifact_utf8_string::c.skip.txt",
8888
];

0 commit comments

Comments
 (0)