TZ=UTC mhical <"$MH_TEST_DIR/test1.ics" >"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check display with 24 hour time format and -outfile
mhical -outfile "$MH_TEST_DIR/test1.txt" <"$MH_TEST_DIR/test1.ics"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check display with 12 hour time format and -infile
mhical -form mhical.12hour -infile "$MH_TEST_DIR/test1.ics" \
>"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check display with DST
TZ=EST mhical <"$MH_TEST_DIR/test1.ics" >"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check timezone boundary at transition to daylight saving time
TZ=EST5EDT mhical -format '%(pretty{dtend})' \
-infile "$MH_TEST_DIR/test1.ics" -outfile "$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check timezone boundary at transition from daylight saving time
TZ=EST5EDT mhical -format '%(pretty{dtend})' \
-infile "$MH_TEST_DIR/test1.ics" -outfile "$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
printf 'Local-Mailbox: Requestee2 <requestee2@example.com>\n' >> "$MH"
mhical -reply accept <"$MH_TEST_DIR/test1.ics" | egrep -v '^DTSTAMP:' \
>"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check accept of multiple vevent requests in single vcalendar
cat >"$expected" <<'EOF'
mhical -reply accept <"$MH_TEST_DIR/test1.ics" | egrep -v '^DTSTAMP:' \
>"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check decline of request
mhical -reply decline <"$MH_TEST_DIR/test1.ics" | egrep -v '^DTSTAMP:' \
>"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check response of tentative to request, and -nocontenttype
-infile "$MH_TEST_DIR/test1.ics" | egrep -v '^DTSTAMP:' \
>"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# check cancel request, and -contenttype
mhical -cancel -contenttype <"$MH_TEST_DIR/test1.ics" | egrep -v '^DTSTAMP:' \
>"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
-rm -f "$MH_TEST_DIR/test1.ics"
# Check TZID name wrapped with quotes, this used to cause a segfault.
END:VCALENDAR
EOF
+TZ=UTC mhical <"$MH_TEST_DIR/test1.ics" >"$MH_TEST_DIR/test1.txt"
+check "$expected" "$MH_TEST_DIR/test1.txt"
+
+
+# Check start datetime without a time, and missing end datetime.
+cat >"$expected" <<'EOF'
+Method: PUBLISH
+Summary: Test datetime without time
+At: Wed, 30 Dec 2015 00:00
+To: Wed, 30 Dec 2015 23:59
+EOF
+
+cat >"$MH_TEST_DIR/test1.ics" <<'EOF'
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:icalendar-ruby
+CALSCALE:GREGORIAN
+METHOD:PUBLISH
+BEGIN:VEVENT
+DTSTAMP:20151208T204350Z
+UID:0123456789
+DTSTART;VALUE=DATE:20151230
+CLASS:PRIVATE
+SUMMARY:Test datetime without time
+BEGIN:VALARM
+ACTION:DISPLAY
+DESCRIPTION:REMINDER
+TRIGGER;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
+EOF
+
TZ=UTC mhical <"$MH_TEST_DIR/test1.ics" >"$MH_TEST_DIR/test1.txt"
check "$expected" "$MH_TEST_DIR/test1.txt"
rm -f "$MH_TEST_DIR/test1.ics"