ical.clj. Fix multiline folding according to rfc2445#202
Merged
henryw374 merged 2 commits intojuxt:masterfrom May 7, 2025
Merged
ical.clj. Fix multiline folding according to rfc2445#202henryw374 merged 2 commits intojuxt:masterfrom
henryw374 merged 2 commits intojuxt:masterfrom
Conversation
Collaborator
|
hi. seeing an error running tests eption: clojure.lang.ExceptionInfo: No name |
Contributor
Author
|
@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 |
Contributor
Author
|
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. |
Collaborator
|
thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.