forked from schacon/objective-git
/
helper.nu
21 lines (16 loc) · 875 Bytes
/
helper.nu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;; Test Helper functions/methods/var declarations
;; load library
(load "ObjectiveGit")
(set CFUUIDCreate (NuBridgedFunction functionWithName:"CFUUIDCreate" signature:"@@"))
(set CFUUIDCreateString (NuBridgedFunction functionWithName:"CFUUIDCreateString" signature:"@@@"))
(set NSTemporaryDirectory (NuBridgedFunction functionWithName:"NSTemporaryDirectory" signature:"@"))
(function tmp-dir ()
(set uuid (CFUUIDCreateString nil (CFUUIDCreate nil)))
(NSTemporaryDirectory stringByAppendingPathComponent:uuid))
(macro-0 repo_helper
(set testRepoPath "NuTests/test_repo")
(set testBareRepoPath "NuTests/test_repo_bare_clone.git")
(set headSha "25f6d2b5c50fb1624c3cf0d6ff5bfeb0772ebd68")
(set firstCommitSha "094f1f190d82c99857d8fb2968586be5594d288c")
(- bareRepo is
(GITRepo repoWithPath:testBareRepoPath error:nil)))