-
Notifications
You must be signed in to change notification settings - Fork 58
ical.clj. Fix multiline folding according to rfc2445 #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
hi. seeing an error running tests eption: clojure.lang.ExceptionInfo: No name |
|
@henryw374 Sorry, -*- mode: compilation; default-directory: "~/git/tick/" -*-
Compilation started at Tue May 6 17:52:35
make test-clj
./bin/kaocha :clj
--- clj (clojure.test) ---------------------------
tick.alpha.ical-test
parse-dtstart
line->contentline-test
Simple lines can be parsed to contentlines
Lines with parameters can be parsed to contentlines
stress-test
parse-unicode
parse-icalendar-test
parse-line-folding-test
Folded lines can be parsed
tick.addon-libs-test
locale-test
tz-test
tick.api-test
period-functions-test
range-test
epoch-test
month
extraction-test
predicates-test
subtraction-test
units-test
in-test
truncate-test
fields-test
day-of-week
duration-functions-test
zoned-date-time-test
coincidence-test
non-interval coincidence
date-construction-test
(noon (today))
(noon (date))
time-construction-test
(time)
(midnight)
(noon)
duration-test
comparison-test-date
between-test
LocalDate
offset-date-time-test
offset date time basics
comparison-test
shifting inst
max-min
max-min key
comparables not=
comparables =
comparables =
comparables =
comparables =
ZonedDateTimes in different zones should be equals
ZoneDateTimes and OffsetDateTime should be equals if represents the same point in time
ZoneDateTimes and platform Date should be equals if represents the same point in time
Instants and ZonedDateTimes should be equals if represents the same point in time
durations
constructor-test
instant-test
instant basics
addition-test
adjusters
parse-test
divide-test
today-test
formatting-test
all predefined formatters exist
clock-test
clock
(clock) return type
Time shifting the clock back by 2 hours
with instant
Converting using with-clock
inst to zoned-date-time
date-time to zoned-date-time
date-time to offset-date-time
Creating a clock with a zone, and returning that zone
Creation of clock with fixed instant
Creation of clock with fixed offset
tick.internals-test
parse-test
(time "4pm")
tick.alpha.interval-test
disjoint-test
cannot-disturb-test
difference-test
Empty sets
division-test
unite-test
Unite meeting intervals
Unite overlapping intervals
Unite containing intervals
Unite finished-by intervals
date-relation-test
concur?-test
normalize-test
predicate-test
am-test
complement-test
complement through max of type
complement ordered disjoint intervals
complement meeting intervals
complement empty interval round trip
exhaustive-test
successive-intervals-meet
intersection-test
Empty sets
ordered-disjoint-intervals?-test
group-by-empty-test
difference-invariant-test
concur-test2
division-test2
group-by-test
union-test
counts
union
group-by-intervals-test
p and s
O
M and e
s
f
F
d
D
o
concur-test
basic-relations-test
flatten-test
distinct-test
�[32m66 tests, 699 assertions, 0 failures.�[m
Compilation finished at Tue May 6 17:52:46 |
|
While testing I found another edge case, ics files can contain empty lines, which causes error: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0so I fixed this one too. |
|
thanks |
Hi, I'm trying to parse an ics file that contains long lines split by so called "line folding technique".
According to https://www.ietf.org/rfc/rfc2445.txt
Unfortunately, while
unfolding-line-seq*concatenates such lines properly, it doesn't skip the leading whitespace character, This can cause the parser to break.To reproduce (see ical_test.clj):
By default results in:
The fix skips the initial space char while concatenating.