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
|
@ -1,11 +1,11 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:libgit2dart/libgit2dart.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
final tmpDir = Directory.systemTemp.path;
|
||||
const configFileName = 'test_config';
|
||||
final filePath = p.join(Directory.systemTemp.path, 'test_config');
|
||||
const contents = '''
|
||||
[core]
|
||||
\trepositoryformatversion = 0
|
||||
|
@ -27,13 +27,13 @@ void main() {
|
|||
late Config config;
|
||||
|
||||
setUp(() {
|
||||
File('$tmpDir/$configFileName').writeAsStringSync(contents);
|
||||
config = Config.open('$tmpDir/$configFileName');
|
||||
File(filePath).writeAsStringSync(contents);
|
||||
config = Config.open(filePath);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
config.free();
|
||||
File('$tmpDir/$configFileName').deleteSync();
|
||||
File(filePath).deleteSync();
|
||||
});
|
||||
|
||||
group('Config', () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue