Changeset 36041 in project
- Timestamp:
- 08/05/18 20:55:37 (3 years ago)
- Location:
- release/5/svn-client
- Files:
-
- 2 added
- 1 deleted
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
release/5/svn-client/trunk/svn-client.egg
r36037 r36041 1 ;;; svn-client.meta -*- Hen -*- 2 ((files "svn-client.release-info" "svn-client-base.c" "tests/run.scm" "svn-client.scm" "svn-client.setup" "svn-client.meta") 3 (doc-from-wiki) 4 (author "Alejandro Forero Cuervo") 1 ;;; svn-client.meta -*- scheme -*- 2 ((author "Alejandro Forero Cuervo") 5 3 (maintainer "Peter Bex") 6 (synopsis 7 "A wrapper around Subversion's libsvn_client C library.") 4 (synopsis "A wrapper around Subversion's libsvn_client C library.") 8 5 (category misc) 9 (test-depends test) 10 (license "Public Domain")) 6 (test-dependencies test) 7 (license "Public Domain") 8 (components (extension svn-client 9 (custom-build "build-svn-client")))) -
release/5/svn-client/trunk/svn-client.scm
r33980 r36041 24 24 ) 25 25 26 (import chicken scheme foreign)27 (use lolevel)26 (import scheme (chicken base) (chicken foreign) (chicken memory) 27 (chicken gc)) 28 28 29 29 (foreign-declare "#include \"svn-client-base.c\"") … … 96 96 (c-pointer "svn_log_entry_t")) 97 97 98 (define-foreign-type svn-revnum-type long) 99 98 100 (define svn-log-entry-changed-paths 99 101 (foreign-lambda* apr-hash-type ((svn-log-entry-type log)) … … 150 152 (foreign-lambda* unsigned-int ((svn-opt-revision-type rev)) 151 153 "C_return(rev->kind);")) 152 153 (define-foreign-type svn-revnum-type long)154 154 155 155 ;;; svn_log_changed_path_t -
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)) 11 13 12 14 (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)) 14 16 (define checkout-dir (make-pathname (current-directory) "testcheckout")) 15 17 (define checkout-dir2 (make-pathname (current-directory) "testcheckout2")) … … 20 22 21 23 (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))) 23 25 (define (write-svn-file file data) 24 26 (with-output-to-file (svn-file file) (lambda () (print data)))) … … 31 33 32 34 (test "Make another checkout of revision 0, using a non-canonicalized uri" 33 0 (svn-checkout ( concrepo-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)) 34 36 35 37 (test-group "initial state" … … 84 86 (svn-client-list checkout-dir svn-opt-revision-head #t user pass))) 85 87 (test "Files are marked as such" 86 '( "foo""testdir/bar")87 ( filter-map (lambda (f) (and (eq? (svn-file-kind f) 'file)88 89 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))) 90 92 (test "secondary checkout still empty" 91 93 '("") … … 209 211 (test-group "catenation" 210 212 (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))) 212 214 (delete-file* f) 213 215 (test "Working dir" "Changed\n" contents)) 214 216 (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))) 216 218 (delete-file* f) 217 219 (test "Historical revision" "Also just added\n" contents)))
Note: See TracChangeset
for help on using the changeset viewer.