feat(blob): add bindings and api

This commit is contained in:
Aleksey Kulikov 2021-09-02 17:00:09 +03:00
parent 88d064bda2
commit f0803298c8
14 changed files with 455 additions and 143 deletions

View file

@ -5,30 +5,29 @@ import 'package:libgit2dart/libgit2dart.dart';
import 'helpers/util.dart';
void main() {
group('RefLog', () {
late Repository repo;
late RefLog reflog;
final tmpDir = '${Directory.systemTemp.path}/reflog_testrepo/';
late Repository repo;
late RefLog reflog;
final tmpDir = '${Directory.systemTemp.path}/reflog_testrepo/';
setUp(() async {
if (await Directory(tmpDir).exists()) {
await Directory(tmpDir).delete(recursive: true);
}
await copyRepo(
from: Directory('test/assets/testrepo/'),
to: await Directory(tmpDir).create(),
);
repo = Repository.open(tmpDir);
reflog = RefLog(repo.head);
});
tearDown(() async {
repo.head.free();
reflog.free();
repo.free();
setUp(() async {
if (await Directory(tmpDir).exists()) {
await Directory(tmpDir).delete(recursive: true);
});
}
await copyRepo(
from: Directory('test/assets/testrepo/'),
to: await Directory(tmpDir).create(),
);
repo = Repository.open(tmpDir);
reflog = RefLog(repo.head);
});
tearDown(() async {
repo.head.free();
reflog.free();
repo.free();
await Directory(tmpDir).delete(recursive: true);
});
group('RefLog', () {
test('initializes successfully', () {
expect(reflog, isA<RefLog>());
});