feat(i18n): add support for custom placeholder names

Closes #7799
Closes #8010
This commit is contained in:
Kara Erickson
2016-04-12 10:19:35 -07:00
committed by Robert Messerle
parent 0e56aaf189
commit 2abb414cfb
6 changed files with 133 additions and 16 deletions

View File

@ -104,6 +104,8 @@ export function main() {
it('should parse grouped expressions', () => { checkAction("(1 + 2) * 3", "1 + 2 * 3"); });
it('should ignore comments in expressions', () => { checkAction('a //comment', 'a'); });
it('should parse an empty string', () => { checkAction(''); });
describe("literals", () => {
@ -270,6 +272,8 @@ export function main() {
});
it('should parse conditional expression', () => { checkBinding('a < b ? a : b'); });
it('should ignore comments in bindings', () => { checkBinding('a //comment', 'a'); });
});
describe('parseTemplateBindings', () => {
@ -425,6 +429,9 @@ export function main() {
it('should parse expression with newline characters', () => {
checkInterpolation(`{{ 'foo' +\n 'bar' +\r 'baz' }}`, `{{ "foo" + "bar" + "baz" }}`);
});
it('should ignore comments in interpolation expressions',
() => { checkInterpolation('{{a //comment}}', '{{ a }}'); });
});
describe("parseSimpleBinding", () => {