feat: initial Cutdex application
Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
This commit is contained in:
commit
27e77fff39
718 files changed
+183958
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cutdex/workspace/media_availability.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test(
|
||||
'detects missing originals and restoration independently of preview caches',
|
||||
() async {
|
||||
final directory = await Directory.systemTemp.createTemp(
|
||||
'cutdex-availability-',
|
||||
);
|
||||
addTearDown(() => directory.delete(recursive: true));
|
||||
final file = File('${directory.path}/source.mp4');
|
||||
expect(await checkMediaAvailability(file.uri), MediaAvailability.missing);
|
||||
await file.writeAsBytes([1, 2, 3]);
|
||||
// A readable file is available even when it is not a decodable video.
|
||||
expect(
|
||||
await checkMediaAvailability(file.uri),
|
||||
MediaAvailability.available,
|
||||
);
|
||||
await file.delete();
|
||||
expect(await checkMediaAvailability(file.uri), MediaAvailability.missing);
|
||||
await file.writeAsBytes([4]);
|
||||
expect(
|
||||
await checkMediaAvailability(file.uri),
|
||||
MediaAvailability.available,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'unsupported locations are unavailable rather than reported missing',
|
||||
() async {
|
||||
expect(
|
||||
await checkMediaAvailability(
|
||||
Uri.parse('https://example.com/video.mp4'),
|
||||
),
|
||||
MediaAvailability.inaccessible,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user