Add path_provider for elinux (#12)

Fixed #9
This commit is contained in:
Hidenori Matsubayashi
2021-08-03 10:47:25 +09:00
committed by GitHub
parent 0fe779fc3a
commit 1cc1269f51
24 changed files with 1311 additions and 1 deletions
@@ -0,0 +1,35 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
import 'package:path_provider_elinux/path_provider_elinux.dart';
import 'package:path_provider_platform_interface/path_provider_platform_interface.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
PathProviderELinux.registerWith();
test('registered instance', () {
expect(PathProviderPlatform.instance, isA<PathProviderELinux>());
});
test('getTemporaryPath', () async {
final PathProviderPlatform plugin = PathProviderPlatform.instance;
expect(await plugin.getTemporaryPath(), '/tmp');
});
test('getApplicationSupportPath', () async {
final PathProviderPlatform plugin = PathProviderPlatform.instance;
expect(await plugin.getApplicationSupportPath(), startsWith('/'));
});
test('getApplicationDocumentsPath', () async {
final PathProviderPlatform plugin = PathProviderPlatform.instance;
expect(await plugin.getApplicationDocumentsPath(), startsWith('/'));
});
test('getDownloadsPath', () async {
final PathProviderPlatform plugin = PathProviderPlatform.instance;
expect(await plugin.getDownloadsPath(), startsWith('/'));
});
}