Skip to content

Commit c6cf1fd

Browse files
committed
transpile: snapshots: add dummy files so insta::glob sees multiple tests
insta handily uses different snapshot file naming schemes dependent on whether a glob finds one or multiple files. as we only have one platform-dependent test yet, it doesn't include the @filename suffix, but it will when we add more. for now, add a dummy test so that insta always uses the `@file.c` suffix; we should delete the dummy test when we have more platform-specific tests.
1 parent e6c83d3 commit c6cf1fd

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* empty file until we have multiple tests; if we glob only one test, insta
2+
omits the `@file.c` suffix from snapshots */
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![allow(
2+
dead_code,
3+
mutable_transmutes,
4+
non_camel_case_types,
5+
non_snake_case,
6+
non_upper_case_globals,
7+
unused_assignments,
8+
unused_mut
9+
)]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
source: c2rust-transpile/tests/snapshots.rs
3+
assertion_line: 69
4+
expression: cat tests/snapshots/platform-specific/dummy.rs
5+
input_file: c2rust-transpile/tests/snapshots/platform-specific/dummy.c
6+
---
7+
#![allow(
8+
dead_code,
9+
mutable_transmutes,
10+
non_camel_case_types,
11+
non_snake_case,
12+
non_upper_case_globals,
13+
unused_assignments,
14+
unused_mut
15+
)]
16+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
source: c2rust-transpile/tests/snapshots.rs
3+
assertion_line: 69
4+
expression: cat tests/snapshots/platform-specific/dummy.rs
5+
input_file: c2rust-transpile/tests/snapshots/platform-specific/dummy.c
6+
---
7+
#![allow(
8+
dead_code,
9+
mutable_transmutes,
10+
non_camel_case_types,
11+
non_snake_case,
12+
non_upper_case_globals,
13+
unused_assignments,
14+
unused_mut
15+
)]
16+

0 commit comments

Comments
 (0)