Skip to content

Commit e129e98

Browse files
committed
Add tests
1 parent feb8274 commit e129e98

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

tests/source/attrib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,15 @@ fn issue3509() {
232232
1,
233233
}
234234
}
235+
236+
// #3781
237+
enum E {
238+
#[error(display = "invalid max keyframe interval {} (expected > 0, < {})", _0, i32::max_value() as u64)]
239+
InvalidMaxKeyFrameInterval(u64),
240+
#[error(display = "invalid max keyframe interval {} (expected > 0, < {})", _0, i32::max_value())]
241+
InvalidMaxKeyFrameInterval(u64),
242+
}
243+
244+
// #6374
245+
#[nutype(validate(len_char_min = 5, len_char_max = 20, regex = EMAIL_REGEX, extra_args = make_sure_this_line_is_split,))]
246+
struct Email(String);

tests/target/attrib.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,28 @@ fn issue3509() {
269269
}
270270
}
271271
}
272+
273+
// #3781
274+
enum E {
275+
#[error(
276+
display = "invalid max keyframe interval {} (expected > 0, < {})",
277+
_0,
278+
i32::max_value() as u64
279+
)]
280+
InvalidMaxKeyFrameInterval(u64),
281+
#[error(
282+
display = "invalid max keyframe interval {} (expected > 0, < {})",
283+
_0,
284+
i32::max_value()
285+
)]
286+
InvalidMaxKeyFrameInterval(u64),
287+
}
288+
289+
// #6374
290+
#[nutype(validate(
291+
len_char_min = 5,
292+
len_char_max = 20,
293+
regex = EMAIL_REGEX,
294+
extra_args = make_sure_this_line_is_split,
295+
))]
296+
struct Email(String);

0 commit comments

Comments
 (0)