Skip to content

Commit 6c40ac1

Browse files
committed
Add fixtures.
1 parent b747a60 commit 6c40ac1

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
set -eu -o pipefail
3+
4+
git init;
5+
6+
function baseline() {
7+
local test_date=$1 # first argument is the date to test
8+
9+
git -c section.key="$test_date" config --type=expiry-date section.key && status=0 || status=$?
10+
# git ls-files "$pathspec" && status=0 || status=$?
11+
{
12+
echo "$test_date"
13+
echo "$status"
14+
} >> baseline.git
15+
}
16+
17+
# success
18+
19+
# date formats following to https://git-scm.com/docs/git-log#Documentation/git-log.txt---dateltformatgt
20+
# short
21+
baseline '2022-08-22'
22+
# rfc2822
23+
baseline 'Thu, 18 Aug 2022 12:45:06 +0800'
24+
# iso8601
25+
baseline '2022-08-17 22:04:58 +0200'
26+
# iso8601_strict
27+
baseline '2022-08-17T21:43:13+08:00'
28+
# default
29+
baseline 'Thu Sep 04 2022 10:45:06 -0400'
30+
# unix
31+
baseline '123456789'
32+
# raw
33+
baseline '1660874655 +0800'
34+
35+
# failing
36+
37+
# empty_input
38+
baseline ""
39+
Binary file not shown.

0 commit comments

Comments
 (0)