mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
refactor!: return sets of git type flags instead of integers
This commit is contained in:
parent
050c0eb57a
commit
7618f944c0
12 changed files with 459 additions and 191 deletions
|
@ -343,7 +343,13 @@ void main() {
|
|||
final index = repo.index;
|
||||
index.remove('file');
|
||||
index.add('new_file.txt');
|
||||
expect(repo.status, {'file': 132, 'new_file.txt': 1});
|
||||
expect(
|
||||
repo.status,
|
||||
{
|
||||
'file': {GitStatus.indexDeleted, GitStatus.wtNew},
|
||||
'new_file.txt': {GitStatus.indexNew}
|
||||
},
|
||||
);
|
||||
|
||||
index.free();
|
||||
});
|
||||
|
@ -351,7 +357,11 @@ void main() {
|
|||
test('returns status of a single file for provided path', () {
|
||||
final index = repo.index;
|
||||
index.remove('file');
|
||||
expect(repo.statusFile('file'), 132);
|
||||
expect(
|
||||
repo.statusFile('file'),
|
||||
{GitStatus.indexDeleted, GitStatus.wtNew},
|
||||
);
|
||||
expect(repo.statusFile('.gitignore'), {GitStatus.current});
|
||||
|
||||
index.free();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue