Added credentials
This commit is contained in:
+23
-1
@@ -52,6 +52,28 @@
|
||||
(define first (git-commit "initial commit"))
|
||||
(check-equal? (string-length first) 40)
|
||||
(check-true (git-clean?))
|
||||
(check-equal? (git 'diff) "")
|
||||
(check-equal? (git 'diff '--cached) "")
|
||||
|
||||
(call-with-output-file (build-path "sub" "hello.txt")
|
||||
#:exists 'truncate/replace
|
||||
(lambda (out) (displayln "changed" out)))
|
||||
(define worktree-diff (git 'diff))
|
||||
(check-true (regexp-match? #rx"-hello" worktree-diff))
|
||||
(check-true (regexp-match? #rx"\+changed" worktree-diff))
|
||||
(check-equal? (git 'diff '--cached) "")
|
||||
|
||||
(define diff-output (open-output-string))
|
||||
(parameterize ([current-output-port diff-output])
|
||||
(dgit 'diff))
|
||||
(check-equal? (get-output-string diff-output) worktree-diff)
|
||||
|
||||
(git 'add "sub/hello.txt")
|
||||
(check-equal? (git 'diff) "")
|
||||
(define cached-diff (git 'diff '--cached))
|
||||
(check-true (regexp-match? #rx"-hello" cached-diff))
|
||||
(check-true (regexp-match? #rx"\+changed" cached-diff))
|
||||
(git 'commit "prepare branches")
|
||||
|
||||
(git 'checkout '-b "work")
|
||||
(call-with-output-file (build-path "sub" "hello.txt")
|
||||
@@ -78,6 +100,6 @@
|
||||
(git 'tag '-d "v0.1")
|
||||
(check-equal? (git 'tag) '())
|
||||
|
||||
(check-equal? (length (git 'log 10)) 1)))
|
||||
(check-equal? (length (git 'log 10)) 2)))
|
||||
(lambda ()
|
||||
(delete-directory/files tmp)))
|
||||
|
||||
Reference in New Issue
Block a user