mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
refactor: compose paths using path package
This commit is contained in:
parent
f2e78daa42
commit
59cf7174f6
36 changed files with 225 additions and 201 deletions
|
@ -2,6 +2,7 @@ import 'dart:ffi';
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:libgit2dart/libgit2dart.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'helpers/util.dart';
|
||||
|
@ -14,7 +15,7 @@ void main() {
|
|||
const newBlobContent = 'New blob\n';
|
||||
|
||||
setUp(() {
|
||||
tmpDir = setupRepo(Directory('test/assets/attributes_repo/'));
|
||||
tmpDir = setupRepo(Directory(p.join('test', 'assets', 'attributes_repo')));
|
||||
repo = Repository.open(tmpDir.path);
|
||||
});
|
||||
|
||||
|
@ -88,8 +89,9 @@ void main() {
|
|||
});
|
||||
|
||||
test('creates new blob from file at provided path', () {
|
||||
final outsideFile =
|
||||
File('${Directory.current.absolute.path}/test/blob_test.dart');
|
||||
final outsideFile = File(
|
||||
p.join(Directory.current.absolute.path, 'test', 'blob_test.dart'),
|
||||
);
|
||||
final oid = repo.createBlobFromDisk(outsideFile.path);
|
||||
final newBlob = repo.lookupBlob(oid);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue