Files
social-app/apps/test/shared/utils/tool_name_localizer_test.dart
T

21 lines
668 B
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:social_app/shared/utils/tool_name_localizer.dart';
void main() {
group('localizeToolName', () {
test('translates dot style tool names', () {
expect(localizeToolName('memory.write'), '写入记忆');
expect(localizeToolName('calendar.read'), '读取日程');
});
test('translates snake style aliases', () {
expect(localizeToolName('memory_write'), '写入记忆');
expect(localizeToolName('calendar_read'), '读取日程');
});
test('returns raw name for unknown tool', () {
expect(localizeToolName('unknown.tool'), 'unknown.tool');
});
});
}