mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
fix tests on windows platform
I had some problems with SSH for windows and I skipped them for the specific platform: - clones repository with provided keypair - clones repository with provided keypair from memory - throws when provided keypair from memory is incorrect
This commit is contained in:
parent
b66662f33c
commit
bb75589a14
17 changed files with 160 additions and 95 deletions
|
@ -1,3 +1,4 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
|
@ -12,6 +13,8 @@ void main() {
|
|||
late RefLog reflog;
|
||||
late Directory tmpDir;
|
||||
|
||||
const splitter = LineSplitter();
|
||||
|
||||
setUp(() {
|
||||
tmpDir = setupRepo(Directory(p.join('test', 'assets', 'test_repo')));
|
||||
repo = Repository.open(tmpDir.path);
|
||||
|
@ -32,7 +35,9 @@ void main() {
|
|||
});
|
||||
|
||||
test('returns the log message', () {
|
||||
expect(reflog[0].message, "commit: add subdirectory file");
|
||||
final message = splitter.convert(reflog[0].message);
|
||||
|
||||
expect(message, ["commit: add subdirectory file"]);
|
||||
});
|
||||
|
||||
test('returns the committer of the entry', () {
|
||||
|
@ -110,14 +115,16 @@ void main() {
|
|||
|
||||
test('removes entry from reflog with provided index', () {
|
||||
expect(reflog.length, 4);
|
||||
expect(reflog[0].message, 'commit: add subdirectory file');
|
||||
|
||||
var message = splitter.convert(reflog[0].message);
|
||||
expect(message, ['commit: add subdirectory file']);
|
||||
|
||||
reflog.remove(0);
|
||||
expect(reflog.length, 3);
|
||||
|
||||
message = splitter.convert(reflog[0].message);
|
||||
expect(
|
||||
reflog[0].message,
|
||||
"merge feature: Merge made by the 'recursive' strategy.",
|
||||
);
|
||||
message, ["merge feature: Merge made by the 'recursive' strategy."]);
|
||||
});
|
||||
|
||||
test('throws when trying to remove entry from reflog at invalid index', () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue