Skip to content

Commit

Permalink
test: translation overrides + parameter type
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed Mar 3, 2024
1 parent 3b54c35 commit 32a5ddf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions slang/test/unit/api/translation_overrides_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ void main() {
expect(parsed, 'About Page');
});

test('Should ignore type in interpolated string', () {
final meta = _buildMetaWithOverrides({
'aboutPage.title': r'About ${arg: int}',
});
final parsed = TranslationOverrides.string(meta, 'aboutPage.title', {
'arg': 'Page',
});
expect(parsed, 'About Page');
});

test('Should return an interpolated string with dollar only', () {
final meta = _buildMetaWithOverrides({
'aboutPage.title': r'About $arg',
Expand Down

0 comments on commit 32a5ddf

Please sign in to comment.