-
Notifications
You must be signed in to change notification settings - Fork 12
/
testparser.sh.in
134 lines (131 loc) · 1.98 KB
/
testparser.sh.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#Tests with a date only
./testparser 2006-02-24 \
2006-12 \
2006 \
2006- \
2006-02- \
2006-0224 \
200602-24 \
20060224 \
2001-W1-1 \
2002-W1-1 \
2003-W1-1 \
2004-W1-1 \
2010-W1-1 \
2000-W1-1 \
2006-W1-1 \
2006-W1-2 \
2006-W02 \
2006-W2 \
2006-W02-01 \
2006-W02-1 \
2006-W2-01 \
2006-W2-1 \
2006-W2-2 \
2006-W2-8 \
2006-W3-1 \
2006-W22 \
2006-W22-11 \
06-02-24 \
06-12 \
06-02- \
06-0224 \
0602-24 \
060224 \
06-W22 \
06-W2 \
06-W22-11 \
06-W2-1 \
-6-02-24 \
-6-12 \
-6 \
-6- \
-6-02- \
-6-0224 \
-602-24 \
-6-W22 \
-6-W2 \
-6-W22-11 \
-6-W2-1 \
--0224 \
--02-24 \
--2-24 \
--02-2 \
--02 \
---24 \
-W2 \
-W2-11 \
-W-3 \
--W-3 \
2006-001 \
2006-002 \
2006-032 \
2006-055 \
2006-365 \
2004-001 \
2004-366 \
-055 \
--055 \
2006T
#Current year in x century
./testparser 20 \
1
#x year in current century
./testparser -06
#x year and month in current century
./testparser -06-02
#x year, month, and date in current century
./testparser 06-02-24
#x month and date in current year
./testparser --02-24
#x date in current year and month
./testparser ---24
#Tests with a time only
./testparser T22:63:24-11:21 \
T22:63:24+50:70 \
T22:1:2 \
T22:1Z \
T22: \
T22 \
T2 \
T2:2:2
#Tests with both a date and a time
./testparser 2006-02-24T02:43:24 \
2006-02-24T22:43:24 \
2006-02-24T22:63:24 \
2006-12T12:34 \
2006T22
#Tests with a date, a time, and a time zone
./testparser 2006-02-24T22:63:24-01:00 \
2006-02-24T22:63:24Z \
2006-02-24T22:63:24-1 \
2006-02-24T22:63:24-01 \
2006-02-24T22:63:24-01:32 \
2006-02-24T22:63:24-01:0 \
2006-02-24T22:63:24-01:00 \
2006-02-24T22:63:24-01:01 \
2006-02-24T22:63:24-01:11 \
2006-02-24T22:63:24-11:21
#Invalid dates
./testparser '' \
T \
2006-W \
2006-366 \
2006-400 \
2004-367 \
-2006-02-24T02:43:24 \
-2006-02-24T22:43:24 \
-2006-02-24T22:63:24 \
-2006-12T12:34 \
-2006T22 \
-60224 \
--2006-02-24T02:43:24 \
--2006-02-24T22:43:24 \
--2006-02-24T22:63:24 \
--2006-12T12:34 \
--2006T22 \
---2006-02-24T02:43:24 \
---2006-02-24T22:43:24 \
---2006-02-24T22:63:24 \
---2006-12T12:34 \
---2006T22