diff options
author | JP Rosevear <jpr@src.gnome.org> | 2001-01-24 03:20:44 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-01-24 03:20:44 +0800 |
commit | fd279723663879e742e53d7b3503248f6af91791 (patch) | |
tree | 09233c88d6c42b5bb324be7c64a8f8c64ff02846 /libical/src/test | |
parent | 34bcd381ce1985cc762a896f15d427e368af95e5 (diff) | |
download | gsoc2013-evolution-fd279723663879e742e53d7b3503248f6af91791.tar gsoc2013-evolution-fd279723663879e742e53d7b3503248f6af91791.tar.gz gsoc2013-evolution-fd279723663879e742e53d7b3503248f6af91791.tar.bz2 gsoc2013-evolution-fd279723663879e742e53d7b3503248f6af91791.tar.lz gsoc2013-evolution-fd279723663879e742e53d7b3503248f6af91791.tar.xz gsoc2013-evolution-fd279723663879e742e53d7b3503248f6af91791.tar.zst gsoc2013-evolution-fd279723663879e742e53d7b3503248f6af91791.zip |
This commit was generated by cvs2svn to compensate for changes in r7747,
which included commits to RCS files with non-trunk default branches.
svn path=/trunk/; revision=7748
Diffstat (limited to 'libical/src/test')
-rw-r--r-- | libical/src/test/process.c | 6 | ||||
-rw-r--r-- | libical/src/test/recur.c | 34 |
2 files changed, 23 insertions, 17 deletions
diff --git a/libical/src/test/process.c b/libical/src/test/process.c index 42ae3b8037..56f1c65fb1 100644 --- a/libical/src/test/process.c +++ b/libical/src/test/process.c @@ -19,10 +19,6 @@ the License for the specific language governing rights and limitations under the License. - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - ======================================================================*/ #include <stdio.h> /* for printf */ @@ -110,7 +106,6 @@ int main(int argc, char* argv[]) ical_class class; icalcomponent *match; icalcomponent *inner; - icalcomponent *p; icalcomponent *reply = 0; assert(c!=0); @@ -241,7 +236,6 @@ int main(int argc, char* argv[]) conflicts with this meeting. I am delegating my attendance to Bob. "); icalset_add_component(out,reply); - } else if (dtstart.hour%4 == 1) { /* Counter propose to next available time */ diff --git a/libical/src/test/recur.c b/libical/src/test/recur.c index 2967ee7977..546cacb007 100644 --- a/libical/src/test/recur.c +++ b/libical/src/test/recur.c @@ -23,10 +23,6 @@ the License for the specific language governing rights and limitations under the License. - The original author is Eric Busboom - The original code is usecases.c - - ======================================================================*/ #include "ical.h" @@ -48,23 +44,39 @@ int main(int argc, char *argv[]) struct icalrecurrencetype recur; icalrecur_iterator* ritr; time_t tt; + char* file; + + if (argc <= 1){ + file = "../../test-data/recur.txt"; + } else if (argc == 2){ + file = argv[1]; + } else { + fprintf(stderr,"usage: recur [input file]\n"); + exit(1); + } + + cin = icalfileset_new(file); + + if(cin == 0){ + fprintf(stderr,"recur: can't open file %s\n",file); + exit(1); + } - cin = icalfileset_new(argv[1]); - assert(cin != 0); for (itr = icalfileset_get_first_component(cin); itr != 0; itr = icalfileset_get_next_component(cin)){ desc = icalcomponent_get_first_property(itr,ICAL_DESCRIPTION_PROPERTY); - assert(desc !=0); - dtstart = icalcomponent_get_first_property(itr,ICAL_DTSTART_PROPERTY); - assert(dtstart !=0); - rrule = icalcomponent_get_first_property(itr,ICAL_RRULE_PROPERTY); - assert(rrule !=0); + if (desc == 0 || dtstart == 0 || rrule == 0){ + printf("\n******** Error in input component ********\n"); + printf("The following component is malformed:\n %s\n", + icalcomponent_as_ical_string(itr)); + continue; + } recur = icalproperty_get_rrule(rrule); start = icalproperty_get_dtstart(dtstart); |