mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
test: fix tests failing on windows
This commit is contained in:
parent
f4e17b124d
commit
a71bb14b86
8 changed files with 26 additions and 34 deletions
|
@ -1,5 +1,4 @@
|
|||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:libgit2dart/libgit2dart.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
@ -10,7 +9,7 @@ void main() {
|
|||
group('Repository.open', () {
|
||||
test("throws when repository isn't found at provided path", () {
|
||||
expect(
|
||||
() => Repository.open(''),
|
||||
() => Repository.open('/not/there'),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
|
@ -33,17 +32,11 @@ void main() {
|
|||
});
|
||||
|
||||
test('returns path to the repository', () {
|
||||
expect(
|
||||
repo.path,
|
||||
'${Directory.current.path}/test/assets/empty_bare.git/',
|
||||
);
|
||||
expect(repo.path, contains('/test/assets/empty_bare.git/'));
|
||||
});
|
||||
|
||||
test('returns path to root directory for the repository', () {
|
||||
expect(
|
||||
repo.commonDir,
|
||||
'${Directory.current.path}/test/assets/empty_bare.git/',
|
||||
);
|
||||
expect(repo.commonDir, contains('/test/assets/empty_bare.git/'));
|
||||
});
|
||||
|
||||
test('returns empty string as path of the working directory', () {
|
||||
|
@ -65,16 +58,13 @@ void main() {
|
|||
});
|
||||
|
||||
test('returns path to the repository', () {
|
||||
expect(
|
||||
repo.path,
|
||||
'${Directory.current.path}/test/assets/empty_standard/.gitdir/',
|
||||
);
|
||||
expect(repo.path, contains('/test/assets/empty_standard/.gitdir/'));
|
||||
});
|
||||
|
||||
test("returns path to parent repo's .git folder for the repository", () {
|
||||
expect(
|
||||
repo.commonDir,
|
||||
'${Directory.current.path}/test/assets/empty_standard/.gitdir/',
|
||||
contains('/test/assets/empty_standard/.gitdir/'),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -113,10 +103,7 @@ void main() {
|
|||
});
|
||||
|
||||
test('returns path to working directory', () {
|
||||
expect(
|
||||
repo.workdir,
|
||||
'${Directory.current.path}/test/assets/empty_standard/',
|
||||
);
|
||||
expect(repo.workdir, contains('/test/assets/empty_standard/'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue