Ignore:
Timestamp:
08/05/18 20:55:37 (20 months ago)
Author:
sjamaan
Message:

Initial port of svn-client to CHICKEN 5

Location:
release/5/svn-client
Files:
1 added
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/5/svn-client/trunk/tests/run.scm

    r33980 r36041  
    1 (use test svn-client posix srfi-1 utils)
    2 
    3 (when (file-exists? "testrepo") ; This probably doesn't work under Windows ;)
    4   (system "rm -rf testrepo"))
    5 
    6 (when (file-exists? "testcheckout")
    7   (system "rm -rf testcheckout"))
    8 
    9 (when (file-exists? "testcheckout2")
    10   (system "rm -rf testcheckout2"))
     1(import test svn-client (chicken file) (chicken pathname)
     2        (chicken process-context) (chicken io) (chicken process)
     3        (chicken sort))
     4
     5(when (directory-exists? "testrepo")
     6  (delete-directory "testrepo" #t))
     7
     8(when (directory-exists? "testcheckout")
     9  (delete-directory "testcheckout" #t))
     10
     11(when (directory-exists? "testcheckout2")
     12  (delete-directory "testcheckout2" #t))
    1113
    1214(define repo-dir (make-pathname (current-directory) "testrepo"))
    13 (define repo-uri (conc "file://" repo-dir))
     15(define repo-uri (string-append "file://" repo-dir))
    1416(define checkout-dir (make-pathname (current-directory) "testcheckout"))
    1517(define checkout-dir2 (make-pathname (current-directory) "testcheckout2"))
     
    2022
    2123(define (svn-file f) (make-pathname checkout-dir f))
    22 (define (repo-file f) (conc "file://" (make-pathname repo-dir f)))
     24(define (repo-file f) (string-append "file://" (make-pathname repo-dir f)))
    2325(define (write-svn-file file data)
    2426  (with-output-to-file (svn-file file) (lambda () (print data))))
     
    3133
    3234(test "Make another checkout of revision 0, using a non-canonicalized uri"
    33       0 (svn-checkout (conc repo-uri "/") checkout-dir2 svn-opt-revision-head #t user pass))
     35      0 (svn-checkout (string-append repo-uri "/") checkout-dir2 svn-opt-revision-head #t user pass))
    3436
    3537(test-group "initial state"
     
    8486             (svn-client-list checkout-dir svn-opt-revision-head #t user pass)))
    8587  (test "Files are marked as such"
    86         '("foo" "testdir/bar")
    87         (filter-map (lambda (f) (and (eq? (svn-file-kind f) 'file)
    88                                      (svn-file-path f)))
    89                     (svn-client-list checkout-dir svn-opt-revision-head #t user pass)))
     88        '(#f "foo" #f "testdir/bar")
     89        (map (lambda (f) (and (eq? (svn-file-kind f) 'file)
     90                              (svn-file-path f)))
     91             (svn-client-list checkout-dir svn-opt-revision-head #t user pass)))
    9092  (test "secondary checkout still empty"
    9193        '("")
     
    209211(test-group "catenation"
    210212  (let* ((f (svn-client-cat (svn-file "testdir/bar") svn-opt-revision-unspecified user pass))
    211          (contents (read-all f)))
     213         (contents (with-input-from-file f read-string)))
    212214    (delete-file* f)
    213215    (test "Working dir" "Changed\n" contents))
    214216  (let* ((f (svn-client-cat (svn-file "testdir/bar") (make-svn-opt-revision-number 2) user pass))
    215          (contents (read-all f)))
     217         (contents (with-input-from-file f read-string)))
    216218    (delete-file* f)
    217219    (test "Historical revision" "Also just added\n" contents)))
Note: See TracChangeset for help on using the changeset viewer.