diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2014-08-23 12:18:41 -0700 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2014-08-23 12:18:41 -0700 |
commit | f5c5d15b12b64d9d9e8c775baaf495e05de29a23 (patch) | |
tree | d12dacddc2e72cebfac0c66893b58fc204628d0a /test | |
parent | 341e7309ad06f52e84e5d1fa43cdc6e9b1755f53 (diff) | |
parent | 87354411a3c378093e666706119124f929e34368 (diff) | |
download | gall-f5c5d15b12b64d9d9e8c775baaf495e05de29a23.tar.gz |
merge master changes into replace branch
Diffstat (limited to 'test')
-rw-r--r-- | test/create_test_repo.sh | 1 | ||||
-rw-r--r-- | test/lorries-broken.tar | bin | 0 -> 81920 bytes | |||
-rw-r--r-- | test/test-gall.repository.lua | 8 | ||||
-rw-r--r-- | test/withrepo.lua | 9 |
4 files changed, 15 insertions, 3 deletions
diff --git a/test/create_test_repo.sh b/test/create_test_repo.sh index 7eedefa..8e01b4d 100644 --- a/test/create_test_repo.sh +++ b/test/create_test_repo.sh @@ -3,3 +3,4 @@ cd test tar xf test_repo.tar +tar xf lorries-broken.tar diff --git a/test/lorries-broken.tar b/test/lorries-broken.tar Binary files differnew file mode 100644 index 0000000..074d1cf --- /dev/null +++ b/test/lorries-broken.tar diff --git a/test/test-gall.repository.lua b/test/test-gall.repository.lua index 87a22f8..12f2f46 100644 --- a/test/test-gall.repository.lua +++ b/test/test-gall.repository.lua @@ -222,6 +222,14 @@ function suite.merge_base_annotated_tags() assert(repo:merge_base(sha_1, sha_2) == sha_b) end +function suite.merge_base_lorries_regression() + local repo = test_repo("lorries.git") + local sha_1 = "738022ab867407fc9e906e89268043f72179730a" + local sha_2 = "2f0995c6c852c9b9d6ce584f3b9f38a981a40cf3" + local sha_b = "738022ab867407fc9e906e89268043f72179730a" + assert(repo:merge_base(sha_1, sha_2) == sha_b) +end + function suite.rev_list() local repo = test_repo() local sha_new = "0b65c32b6a5277ff0e75ddad9e3914148914042d" diff --git a/test/withrepo.lua b/test/withrepo.lua index bf90b0c..0795993 100644 --- a/test/withrepo.lua +++ b/test/withrepo.lua @@ -7,12 +7,15 @@ local _xpcall = xpcall function xpcall(fn, tb) os.execute("rm -rf test/test_repo") + os.execute("rm -rf test/lorries.git") local ok, msg = _xpcall(fn, tb) os.execute("rm -rf test/test_repo") + os.execute("rm -rf test/lorries.git") return ok, msg end -function test_repo() +function test_repo(reponame) + reponame = reponame or "test_repo" os.execute("sh test/create_test_repo.sh") - return assert(require("gall.repository").new "test/test_repo") -end
\ No newline at end of file + return assert(require("gall.repository").new("test/" .. reponame)) +end |