Files
tatuchat/test/command_hint_test.dart
Welton Moura 0037b0b9cf
Some checks failed
Main Deploy Workflow / deploy_web (push) Has been cancelled
Main Deploy Workflow / deploy_playstore_internal (push) Has been cancelled
Close stale issues and PRs / stale (push) Has been cancelled
Initial commit
2026-09-11 15:59:56 -03:00

30 lines
909 B
Dart

// SPDX-FileCopyrightText: 2019-Present Christian Kußowski
// SPDX-FileCopyrightText: 2019-Present Contributors to FluffyChat
//
// SPDX-License-Identifier: AGPL-3.0-or-later
import 'dart:convert';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'utils/test_client.dart';
void main() async {
test('Check for missing /command hints', () async {
final translated =
jsonDecode(File('lib/l10n/intl_en.arb').readAsStringSync()).keys
.where((String k) => k.startsWith('commandHint_'))
.map((k) => k.replaceFirst('commandHint_', ''));
final commands = (await prepareTestClient()).commands.keys;
final missing = commands.where((c) => !translated.contains(c)).toList();
expect(
0,
missing.length,
reason:
'missing hints for $missing\nAdding hints? See scripts/generate_command_hints_glue.sh',
);
});
}