An operator's DATA_LOCATION and BACKUP_LOCATION may name a subdivision
(ISO 3166-2, US-CA, DE-BY) besides the EU or a country. The app adds
"(EU)" to a member country and the country to a subdivision ("Germany
(EU)", "California, United States", "Bavaria, Germany (EU)"), in
English and German, and shows the most specific flag there is: a
subdivision's own where the flag package has one, else its country's.
Subdivision names come from Unicode CLDR 48.2 (tool/subdivision_names.py),
bundled with their licence, which the app registers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
26 lines
846 B
Dart
26 lines
846 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:halkyon_app/halkyon_app.dart';
|
|
|
|
void main() {
|
|
TestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
test("Unicode CLDR's notice joins the licence list with the flags', as "
|
|
'their licences ask', () async {
|
|
registerHalkyonAppLicenses();
|
|
|
|
final notices = {
|
|
await for (final entry in LicenseRegistry.licenses)
|
|
for (final package in entry.packages)
|
|
package: entry.paragraphs
|
|
.map((paragraph) => paragraph.text)
|
|
.join('\n'),
|
|
};
|
|
expect(notices['Unicode CLDR'], contains('UNICODE LICENSE V3'));
|
|
expect(notices['Unicode CLDR'], contains('Unicode, Inc.'));
|
|
expect(
|
|
notices['flag-icons'],
|
|
contains('Copyright (c) 2013 Panayiotis Lipiridis'),
|
|
);
|
|
});
|
|
}
|