Added credentials
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#lang racket/base
|
||||
(require racket/file rackunit git)
|
||||
(define tmp (make-temporary-file "racket-git-stress~a" 'directory))
|
||||
(dynamic-wind
|
||||
void
|
||||
(lambda ()
|
||||
(parameterize ([current-directory tmp])
|
||||
(git 'init)
|
||||
(git 'config "user.name" "Stress Test")
|
||||
(git 'config "user.email" "stress@example.invalid")
|
||||
(for ([i (in-range 50)])
|
||||
(call-with-output-file "counter.txt" #:exists 'truncate/replace
|
||||
(lambda (out) (fprintf out "~a\n" i)))
|
||||
(git 'add "counter.txt")
|
||||
(define oid (git 'commit (format "commit ~a" i)))
|
||||
(check-equal? (string-length oid) 40))
|
||||
(check-equal? (length (git 'log 100)) 50)))
|
||||
(lambda () (delete-directory/files tmp)))
|
||||
Reference in New Issue
Block a user