Skip to content

Commit cadeaab

Browse files
committed
refactor
specific test names
1 parent 1eca229 commit cadeaab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

git-date/tests/time/parse.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn special_time_is_ok_for_now() {
1515
}
1616

1717
#[test]
18-
fn parse() {
18+
fn short() {
1919
assert_eq!(
2020
git_date::parse("1979-02-26"),
2121
Some(Time {
@@ -25,7 +25,10 @@ fn parse() {
2525
}),
2626
"could not parse with SHORT format"
2727
);
28+
}
2829

30+
#[test]
31+
fn rfc2822() {
2932
assert_eq!(
3033
git_date::parse("Thu, 18 Aug 2022 12:45:06 +0800"),
3134
Some(Time {
@@ -35,7 +38,10 @@ fn parse() {
3538
}),
3639
"could not parse with RFC2822 format"
3740
);
41+
}
3842

43+
#[test]
44+
fn relative() {
3945
let two_weeks_ago = git_date::parse("2 weeks ago").expect("valid time");
4046
assert_eq!(Sign::Plus, two_weeks_ago.sign);
4147
assert_eq!(0, two_weeks_ago.offset_in_seconds);

0 commit comments

Comments
 (0)