fixed bug and created script for running tests
This commit is contained in:
@ -39,4 +39,4 @@ test:
|
||||
@echo
|
||||
./$(EXECUTABLE) -h
|
||||
@echo
|
||||
./$(EXECUTABLE) -f ../tests/calendar.ics
|
||||
../tests/run_tests.sh
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
char *ics_path = "";
|
||||
@ -38,6 +39,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
while(read_until_nl(myfd, my_event)) {
|
||||
if (strncmp(my_event, "BEGIN:VEVENT", 12) == 0) {
|
||||
// include the BEGIN:EVENT to not loose the new line of first field
|
||||
lseek(myfd, -12, SEEK_CUR);
|
||||
memset(my_event, '\0', sizeof(my_event));
|
||||
read_until_string(myfd, my_event, "END:VEVENT");
|
||||
unfolding_string(my_event, unfolded_event);
|
||||
|
Reference in New Issue
Block a user