mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
check if path to folder is correct on windows
This commit is contained in:
parent
8bef38c310
commit
586aa0c6aa
1 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:cli_util/cli_logging.dart';
|
||||||
import 'package:libgit2dart/libgit2dart.dart';
|
import 'package:libgit2dart/libgit2dart.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
@ -30,8 +31,11 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('throws when trying to get odb and error occurs', () {
|
test('throws when trying to get odb and error occurs', () {
|
||||||
Directory('${repo.workdir}.git/objects/').deleteSync(recursive: true);
|
final logger = Logger.standard();
|
||||||
expect(Directory('${repo.workdir}.git/objects/').existsSync(), false);
|
final objectsDir = Directory('${repo.workdir}.git/objects/');
|
||||||
|
logger.stdout(objectsDir.path);
|
||||||
|
objectsDir.deleteSync(recursive: true);
|
||||||
|
expect(objectsDir.existsSync(), false);
|
||||||
expect(
|
expect(
|
||||||
() => repo.odb,
|
() => repo.odb,
|
||||||
throwsA(isA<LibGit2Error>()),
|
throwsA(isA<LibGit2Error>()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue