Changeset 34045 in project


Ignore:
Timestamp:
05/01/17 05:24:18 (2 years ago)
Author:
Ivan Raikov
Message:

mbox: added test cases

Location:
release/4/mbox/trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/mbox/trunk/mbox-string.scm

    r24969 r34045  
    22;;  mbox parser combinators specialized for strings.
    33;;
    4 ;;   Copyright 2009-2011 Ivan Raikov and the Okinawa Institute of Science
    5 ;;   and Technology.
     4;;   Copyright 2009-2017 Ivan Raikov
    65;;
    76;;
     
    293292                 string-find
    294293                 identity
    295                  (lambda (x . rest) (read-all x))
     294                 (lambda (x . rest)
     295                   (print "string-input: x = " x)
     296                   (read-all x))
    296297                 ))
    297298
  • release/4/mbox/trunk/mbox.scm

    r27583 r34045  
    55;;  Based on RFC 4155, "The application/mbox Media Type".
    66;;
    7 ;;  Copyright 2010-2012 Ivan Raikov and the Okinawa Institute of Science
    8 ;;  and Technology.
     7;;  Copyright 2010-2017 Ivan Raikov.
    98;;
    109;;  This program is free software: you can redistribute it and/or
     
    4140                      )
    4241                (only internet-message <InetMessage> CoreABNF->InetMessage CoreABNF->InetMessage/UTF8)
    43                 (only extras pp)
     42                (only extras pp fprintf)
    4443                )
    4544
     
    5251  (body         message-body )
    5352  )
     53
     54(define-record-printer (message x out)
     55  (fprintf out "#(message envelope=~S headers=~S body=~S)"
     56           (message-envelope x)
     57           ((message-headers x) )
     58           ((message-body x) )
     59           ))
    5460
    5561
     
    283289
    284290    (lambda (s)
    285 
    286291      (let* ((res (find (string->input-stream "\n\n") s))
    287292             (s1  (mbox-envelope identity error `(() ,(car res))))
    288293             (s2  (cadr res)))
    289 
    290294        (and (pair? s1)
    291295             
     
    315319    (lambda (filename)
    316320     
    317       (let* ((strm    (file->input-stream filename 1048476))
     321      (let* ((strm    (file->input-stream filename))
    318322             (res     (find (string->input-stream "\nFrom ") strm)))
    319323
  • release/4/mbox/trunk/mbox.setup

    r27583 r34045  
    44  (make-pathname #f fn ##sys#load-dynamic-extension))   
    55
    6 (compile -O3 -d0 -s mbox.scm -j mbox)
     6(compile -O0 -d2 -s mbox.scm -j mbox)
    77(compile -s mbox.import.scm)
    88
     
    2121
    2222
    23 (compile -O3 -d0 -s mbox-string.scm -j mbox-string)
     23(compile -O0 -d2 -s mbox-string.scm -j mbox-string)
    2424(compile -s mbox-string.import.scm)
    2525
Note: See TracChangeset for help on using the changeset viewer.