@@ -496,6 +496,51 @@ describe('compiler compliance: bindings', () => {
496
496
expectEmit ( result . source , template , 'Incorrect handling of interpolated properties' ) ;
497
497
} ) ;
498
498
499
+
500
+ it ( 'should generate the proper update instructions for interpolated attributes' , ( ) => {
501
+ const files : MockDirectory = getAppFiles ( `
502
+ <div attr.title="a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f{{six}}g{{seven}}h{{eight}}i{{nine}}j"></div>
503
+ <div attr.title="a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f{{six}}g{{seven}}h{{eight}}i"></div>
504
+ <div attr.title="a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f{{six}}g{{seven}}h"></div>
505
+ <div attr.title="a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f{{six}}g"></div>
506
+ <div attr.title="a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f"></div>
507
+ <div attr.title="a{{one}}b{{two}}c{{three}}d{{four}}e"></div>
508
+ <div attr.title="a{{one}}b{{two}}c{{three}}d"></div>
509
+ <div attr.title="a{{one}}b{{two}}c"></div>
510
+ <div attr.title="a{{one}}b"></div>
511
+ <div attr.title="{{one}}"></div>
512
+ ` ) ;
513
+
514
+ const template = `
515
+ …
516
+ if (rf & 2) {
517
+ i0.Δselect(0);
518
+ i0.ΔattributeInterpolateV("title", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]);
519
+ i0.Δselect(1);
520
+ i0.ΔattributeInterpolate8("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i");
521
+ i0.Δselect(2);
522
+ i0.ΔattributeInterpolate7("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h");
523
+ i0.Δselect(3);
524
+ i0.ΔattributeInterpolate6("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g");
525
+ i0.Δselect(4);
526
+ i0.ΔattributeInterpolate5("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f");
527
+ i0.Δselect(5);
528
+ i0.ΔattributeInterpolate4("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e");
529
+ i0.Δselect(6);
530
+ i0.ΔattributeInterpolate3("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d");
531
+ i0.Δselect(7);
532
+ i0.ΔattributeInterpolate2("title", "a", ctx.one, "b", ctx.two, "c");
533
+ i0.Δselect(8);
534
+ i0.ΔattributeInterpolate1("title", "a", ctx.one, "b");
535
+ i0.Δselect(9);
536
+ i0.ΔattributeInterpolate("title", ctx.one);
537
+ }
538
+ …
539
+ ` ;
540
+ const result = compile ( files , angularFiles ) ;
541
+ expectEmit ( result . source , template , 'Incorrect handling of interpolated properties' ) ;
542
+ } ) ;
543
+
499
544
it ( 'should keep local ref for host element' , ( ) => {
500
545
const files : MockDirectory = getAppFiles ( `
501
546
<b ngNonBindable #myRef id="my-id">
0 commit comments