From 29f9888a985b14cf1025105baa1fd262c751cc10 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 20 May 2021 11:17:39 +0100 Subject: [PATCH] test(compiler-cli): clarify source-map expectations in compliance tests (#42062) The compliance tests can check source-map segments against expectations encoded into the expectation files. Previously, the encoding of the expected segment was only delimited by whitespace, but this made it difficult to identify segments that started or ended with whitespace. Now these segment expectations are wrapped in double-quotes which makes it easier to read and understand the expectation files. PR Close #42062 --- .../compiler-cli/test/compliance/README.md | 3 ++- .../external_templates/escaped_chars.js | 6 +++--- .../escaped_chars_partial.js | 6 +++--- .../external_templates/external_template.js | 14 ++++++------- .../external_template_partial.js | 14 ++++++------- .../external_templates/extra_root_dir.js | 14 ++++++------- .../extra_root_dir_partial.js | 14 ++++++------- .../inline_templates/escape_sequences.js | 2 +- .../escape_sequences_partial.js | 2 +- .../i18n_message_container_tag.js | 14 ++++++------- .../i18n_message_container_tag_partial.js | 14 ++++++------- .../i18n_message_element_whitespace.js | 20 +++++++++---------- ...i18n_message_element_whitespace_partial.js | 20 +++++++++---------- .../i18n_message_interpolation_whitespace.js | 12 +++++------ ...essage_interpolation_whitespace_partial.js | 12 +++++------ .../i18n_message_placeholder.js | 10 +++++----- .../i18n_message_placeholder_partial.js | 10 +++++----- .../inline_templates/i18n_message_simple.js | 4 ++-- .../i18n_message_simple_partial.js | 4 ++-- .../inline_templates/input_binding_class.js | 8 ++++---- .../input_binding_class_partial.js | 8 ++++---- .../inline_templates/input_binding_complex.js | 4 ++-- .../input_binding_complex_partial.js | 4 ++-- .../input_binding_longhand.js | 4 ++-- .../input_binding_longhand_partial.js | 4 ++-- .../inline_templates/input_binding_simple.js | 4 ++-- .../input_binding_simple_partial.js | 4 ++-- .../inline_templates/interpolation_basic.js | 6 +++--- .../interpolation_basic_partial.js | 6 +++--- .../inline_templates/interpolation_complex.js | 6 +++--- .../interpolation_complex_partial.js | 6 +++--- .../interpolation_properties.js | 4 ++-- .../interpolation_properties_partial.js | 4 ++-- .../interpolation_with_pipe.js | 6 +++--- .../interpolation_with_pipe_partial.js | 6 +++--- .../inline_templates/ng_for_simple.js | 16 +++++++-------- .../inline_templates/ng_for_simple_partial.js | 14 ++++++------- .../inline_templates/ng_for_templated.js | 4 ++-- .../ng_for_templated_partial.js | 4 ++-- .../inline_templates/ng_if_simple.js | 12 +++++------ .../inline_templates/ng_if_simple_partial.js | 12 +++++------ .../inline_templates/ng_if_templated.js | 4 ++-- .../ng_if_templated_partial.js | 4 ++-- .../output_binding_complex.js | 12 +++++------ .../output_binding_complex_partial.js | 12 +++++------ .../output_binding_longhand.js | 8 ++++---- .../output_binding_longhand_partial.js | 8 ++++---- .../inline_templates/output_binding_simple.js | 10 +++++----- .../output_binding_simple_partial.js | 10 +++++----- .../inline_templates/projection.js | 12 +++++------ .../inline_templates/projection_partial.js | 12 +++++------ .../inline_templates/simple_element.js | 6 +++--- .../simple_element_partial.js | 6 +++--- .../two_way_binding_longhand.js | 6 +++--- .../two_way_binding_longhand_partial.js | 6 +++--- .../two_way_binding_simple.js | 6 +++--- .../two_way_binding_simple_partial.js | 6 +++--- .../inline_templates/update_mode.js | 14 ++++++------- .../inline_templates/update_mode_partial.js | 14 ++++++------- .../inline_templates/void_element.js | 2 +- .../inline_templates/void_element_partial.js | 2 +- .../test_helpers/sourcemap_helpers.ts | 8 ++++---- 62 files changed, 255 insertions(+), 254 deletions(-) diff --git a/packages/compiler-cli/test/compliance/README.md b/packages/compiler-cli/test/compliance/README.md index 0f63b497ed..9c18952898 100644 --- a/packages/compiler-cli/test/compliance/README.md +++ b/packages/compiler-cli/test/compliance/README.md @@ -131,7 +131,7 @@ are intelligently matched to check whether they are equivalent. To check a mapping, add a `// SOURCE:` comment to the end of a line in an expectation file: ``` - // SOURCE: "" + // SOURCE: "" "" ``` The generated code, stripped of the `// SOURCE: ` comment, will still be checked as normal by the @@ -144,6 +144,7 @@ Note: to be `/`. * Whitespace is important and will be included when comparing the segments. * There is a single space character between each part of the line. +* Double quotes in the mapping must be escaped. * Newlines within a mapping must be escaped since the mapping and comment must all appear on a single line of this file. diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars.js index 0ecf510659..2515b59a22 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars.js @@ -1,6 +1,6 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html" "
" … // NOTE: the `\\r\\n` at the end of the next line will be unescaped to `\r\n`. If it was just `\r\n` it would get unescaped to the actual characters. -i0.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" Some Message\r\n Encoded character: 🚀\\r\\n +i0.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" "Some Message\r\n Encoded character: 🚀\r\n" … -i0.ɵɵelementEnd() // SOURCE: "/escaped_chars.html"
+i0.ɵɵelementEnd() // SOURCE: "/escaped_chars.html" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars_partial.js index 7323175318..3dd08974b4 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/escaped_chars_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html"
\r\n +.ɵɵelementStart(0, "div") // SOURCE: "/escaped_chars.html" "
\r\n " … // NOTE: the `\\r\\n` at the end of the next line will be unescaped to `\r\n`. If it was just `\r\n` it would get unescaped to the actual characters. -.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" Some Message\r\n Encoded character: 🚀\\r\\n +.ɵɵtext(1, " Some Message Encoded character: \uD83D\uDE80\\n") // SOURCE: "/escaped_chars.html" "Some Message\r\n Encoded character: 🚀\\r\\n" … -.ɵɵelementEnd() // SOURCE: "/escaped_chars.html"
+.ɵɵelementEnd() // SOURCE: "/escaped_chars.html" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template.js index 6b3728b325..c583d1e709 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template.js @@ -1,13 +1,13 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html" "
" … -i0.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" this is a test +i0.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" "this is a test" … -i0.ɵɵelementEnd() // SOURCE: "/dir/test.html"
+i0.ɵɵelementEnd() // SOURCE: "/dir/test.html" "
" … -i0.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html"
+i0.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html" "
" … -i0.ɵɵtext(3) // SOURCE: "/dir/test.html" {{ 1 + 2 }} +i0.ɵɵtext(3) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}" … -i0.ɵɵelementEnd() // SOURCE: "/dir/test.html"
+i0.ɵɵelementEnd() // SOURCE: "/dir/test.html" "
" … -i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" {{ 1 + 2 }} +i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template_partial.js index ce85a291bf..10b99cc0f8 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/external_template_partial.js @@ -1,14 +1,14 @@ -.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html"
+.ɵɵelementStart(0, "div") // SOURCE: "/dir/test.html" "
" … -.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" this is a test +.ɵɵtext(1, "this is a test") // SOURCE: "/dir/test.html" "this is a test" … -.ɵɵelementEnd() // SOURCE: "/dir/test.html"
\n +.ɵɵelementEnd() // SOURCE: "/dir/test.html" "
\n" … -.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html"
+.ɵɵelementStart(2, "div") // SOURCE: "/dir/test.html" "
" … -.ɵɵtext(3) // SOURCE: "/dir/test.html" {{ 1 + 2 }} +.ɵɵtext(3) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelementEnd() // SOURCE: "/dir/test.html"
+.ɵɵelementEnd() // SOURCE: "/dir/test.html" "
" … -.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" {{ 1 + 2 }} +.ɵɵtextInterpolate(1 + 2) // SOURCE: "/dir/test.html" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir.js index 6611e6336c..f6e07c78f0 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir.js @@ -1,13 +1,13 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html" "
" … -i0.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" this is a test +i0.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" "this is a test" … -i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html"
+i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "
" … -i0.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html"
+i0.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html" "
" … -i0.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }} +i0.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}" … -i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html"
+i0.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "
" … -i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }} +i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir_partial.js index b7216ad0db..57253515af 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/external_templates/extra_root_dir_partial.js @@ -1,13 +1,13 @@ -.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html"
+.ɵɵelementStart(0, "div") // SOURCE: "/extraRootDir/dir/extra.html" "
" … -.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" this is a test +.ɵɵtext(1, "this is a test") // SOURCE: "/extraRootDir/dir/extra.html" "this is a test" … -.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html"
\n +.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "
\n" … -.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html"
+.ɵɵelementStart(2, "div") // SOURCE: "/extraRootDir/dir/extra.html" "
" … -.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }} +.ɵɵtext(3) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}" … -.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html"
+.ɵɵelementEnd() // SOURCE: "/extraRootDir/dir/extra.html" "
" … -.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" {{ 1 + 2 }} +.ɵɵtextInterpolate(1 + 2) // SOURCE: "/extraRootDir/dir/extra.html" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences.js index 6568e55d9b..7fbfa70754 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences.js @@ -1,3 +1,3 @@ consts: [[1, "some-class"]] … -i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts"
\ No newline at end of file +i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts" "
" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences_partial.js index 0a91eeb143..d82e4399e2 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/escape_sequences_partial.js @@ -1,3 +1,3 @@ consts: [[1, "some-class"]] … -.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts"
\ No newline at end of file +.ɵɵelementStart(0, "div", 0) // SOURCE: "/escape_sequences.ts" "
" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag.js index ad6797de0a..f3fe68bdc5 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag.js @@ -1,13 +1,13 @@ -`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" Hello, +`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" "Hello, " … -"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" +"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "" … -}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" World +}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" "World" … -"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" +"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "" … -}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" ! +}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" "!" … -i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts" "
" … -i0.ɵɵelementEnd() // SOURCE: "/i18n_message_container_tag.ts"
+i0.ɵɵelementEnd() // SOURCE: "/i18n_message_container_tag.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag_partial.js index 52bda9e43a..b35e566893 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_container_tag_partial.js @@ -1,14 +1,14 @@ -$localize`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" Hello, +$localize`Hello, ${ // SOURCE: "/i18n_message_container_tag.ts" "Hello, " … -"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" +"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "" … -}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" World +}:START_BOLD_TEXT:World${ // SOURCE: "/i18n_message_container_tag.ts" "World" … -"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" +"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_container_tag.ts" "" … -}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" ! +}:CLOSE_BOLD_TEXT:!` // SOURCE: "/i18n_message_container_tag.ts" "!" … -.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts"
+.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_container_tag.ts" "
" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelem // SOURCE: "/i18n_message_container_tag.ts"
' +.ɵɵelem // SOURCE: "/i18n_message_container_tag.ts" "
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace.js index f0be5ea453..ec6e480f3d 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace.js @@ -1,20 +1,20 @@ -` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" pre-p\\n +` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "pre-p\\n " … -"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts"

\\n +"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "

\\n " … -}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" in-p\\n +}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "in-p\\n " … -"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts"

+"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "

" … -}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" post-p\\n +}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" "post-p\\n" … -i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts" "
" … -i0.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts"
+i0.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts" "
" … -i0.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts"

\\n +i0.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts" "

\\n " … -i0.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts"

+i0.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts" "
" … -i0.ɵɵelementEnd() // SOURCE: "/i18n_message_element_whitespace.ts"
+i0.ɵɵelementEnd() // SOURCE: "/i18n_message_element_whitespace.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace_partial.js index 4c19828520..77461f05ee 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_element_whitespace_partial.js @@ -1,21 +1,21 @@ -$localize` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" pre-p\\n +$localize` pre-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "pre-p\\n " … -"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts"

\\n +"\uFFFD#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "

\\n " … -}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" in-p\\n +}:START_PARAGRAPH: in-p ${ // SOURCE: "/i18n_message_element_whitespace.ts" "in-p\\n " … -"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts"

\\n +"\uFFFD/#2\uFFFD" // SOURCE: "/i18n_message_element_whitespace.ts" "

\\n " … -}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" post-p\\n +}:CLOSE_PARAGRAPH: post-p\n` // SOURCE: "/i18n_message_element_whitespace.ts" "post-p\\n" … -.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts"
\\n +.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_element_whitespace.ts" "
\\n " … -.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts"
\\n +.ɵɵi18nStart(1, 0) // SOURCE: "/i18n_message_element_whitespace.ts" "
\\n " … -.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts"

\\n +.ɵɵelement(2, "p") // SOURCE: "/i18n_message_element_whitespace.ts" "

\\n " … -.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts"

' +.ɵɵi18nEnd() // SOURCE: "/i18n_message_element_whitespace.ts" "
'" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelem // SOURCE: "/i18n_message_element_whitespace.ts"
' +.ɵɵelem // SOURCE: "/i18n_message_element_whitespace.ts" "
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace.js index f4f847d5a3..35af820d2a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace.js @@ -1,11 +1,11 @@ $localize ` pre-title ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" {{titleValue}} -}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" post-title +"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{titleValue}}" +}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-title" … $localize ` pre-body ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" {{bodyValue}} -}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" post-body +"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{bodyValue}}" +}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-body" … -i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts"
+i0.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_partial.js index f58d1a41c5..169ab74007 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_interpolation_whitespace_partial.js @@ -1,12 +1,12 @@ $localize ` pre-title ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" {{titleValue}} -}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" post-title" i18n-title> +"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{titleValue}}" +}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-title\" i18n-title>" … $localize ` pre-body ${ -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" {{bodyValue}} -}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" post-body +"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{bodyValue}}" +}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-body" … -.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts"
' +.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" "
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder.js index 928c751dcc..98c826ef40 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder.js @@ -1,9 +1,9 @@ -`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" Hello, +`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" "Hello, " … -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" {{name}} +"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" "{{name}}" … -}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" ! +}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" "!" … -i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts" "
" … -i0.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts"
+i0.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder_partial.js index 444b7461a7..24eed78924 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_placeholder_partial.js @@ -1,9 +1,9 @@ -$localize`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" Hello, +$localize`Hello, ${ // SOURCE: "/i18n_message_placeholder.ts" "Hello, " … -"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" {{name}} +"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_placeholder.ts" "{{name}}" … -}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" ! +}:INTERPOLATION:!` // SOURCE: "/i18n_message_placeholder.ts" "!" … -.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts"
+.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_placeholder.ts" "
" … -.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts"
' +.ɵɵelementEnd() // SOURCE: "/i18n_message_placeholder.ts" "
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple.js index f31ad659db..d565717489 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple.js @@ -1,3 +1,3 @@ -`Hello, World!` // SOURCE: "/i18n_message_simple.ts" Hello, World! +`Hello, World!` // SOURCE: "/i18n_message_simple.ts" "Hello, World!" … -i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple_partial.js index 1e2384b6c8..e725f9a133 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/i18n_message_simple_partial.js @@ -1,3 +1,3 @@ -$localize`Hello, World!` // SOURCE: "/i18n_message_simple.ts" Hello, World! +$localize`Hello, World!` // SOURCE: "/i18n_message_simple.ts" "Hello, World!" … -.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts"
+.ɵɵelementStart(0, "div") // SOURCE: "/i18n_message_simple.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class.js index 0941a1deea..a9ce11af14 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class.js @@ -1,7 +1,7 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/input_binding_class.ts"
+i0.ɵɵelementEnd() // SOURCE: "/input_binding_class.ts" "
" … -i0.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" [class.initial]="isInitial" \ No newline at end of file +i0.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" "[class.initial]=\"isInitial\"" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class_partial.js index b53f912da4..a1daac1231 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_class_partial.js @@ -1,7 +1,7 @@ -.ɵɵelementStart(0, "div") // SOURCE: "/input_binding_class.ts"
' +.ɵɵelem // SOURCE: "/input_binding_class.ts" "
'" … -.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" [class.initial]="isInitial"> \ No newline at end of file +.ɵɵclassProp("initial", ctx.isInitial) // SOURCE: "/input_binding_class.ts" "[class.initial]=\"isInitial\">" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex.js index 4873f9ebd2..c3e0845e49 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_complex.js @@ -1,3 +1,3 @@ -i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_complex.ts"
' +.ɵɵproperty("title", ctx.greeting // SOURCE: "/input_binding_complex.ts" "[title]=\"greeting + name\">
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand.js index 52704c2f06..141aa437b0 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_longhand.js @@ -1,3 +1,3 @@ -i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_longhand.ts"
' +.ɵɵproperty("title", ctx. // SOURCE: "/input_binding_longhand.ts" "bind-title=\"name\">
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple.js index 040cbace12..be3f6d6dff 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/input_binding_simple.js @@ -1,3 +1,3 @@ -i0.ɵɵelement(0, "div", 0) // SOURCE: "/input_binding_simple.ts"
' +.ɵɵproperty("title", c // SOURCE: "/input_binding_simple.ts" "[title]=\"name\">
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.js index d4eec28404..ec6dbaf6f8 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic.js @@ -1,5 +1,5 @@ -i0.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts"

+i0.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts" "

" … -i0.ɵɵelementEnd() // SOURCE: "/interpolation_basic.ts"

+i0.ɵɵelementEnd() // SOURCE: "/interpolation_basic.ts" "" … -i0.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }} +i0.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" "Hello {{ name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js index defbe70487..1e531cf4b5 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts"

+.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts" "

" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵele // SOURCE: "/interpolation_basic.ts"

' +.ɵɵele // SOURCE: "/interpolation_basic.ts" "'" … -.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }} +.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" "Hello {{ name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js index 2d22cbbeae..c05459cb3c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js @@ -1,5 +1,5 @@ -i0.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts"

+i0.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" "

" … -i0.ɵɵelementEnd() // SOURCE: "/interpolation_complex.ts"

+i0.ɵɵelementEnd() // SOURCE: "/interpolation_complex.ts" "" … -i0.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }} +i0.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" "{{ greeting + \" \" + name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js index 6b72f59dc3..22da8a5d9b 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts"

+.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" "

" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵele // SOURCE: "/interpolation_complex.ts"

' +.ɵɵele // SOURCE: "/interpolation_complex.ts" "'" … -.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }} +.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" "{{ greeting + \" \" + name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js index 3625b88102..743192d832 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js @@ -1,3 +1,3 @@ -i0.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts"
' +.ɵɵpropertyInterpolat // SOURCE: "/interpolation_properties.ts" "id=\"{{name}}\">
'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js index 372d821648..666d6b841e 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js @@ -1,5 +1,5 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" "
" … -i0.ɵɵelementEnd() // SOURCE: "/interpolation_with_pipe.ts"
+i0.ɵɵelementEnd() // SOURCE: "/interpolation_with_pipe.ts" "
" … -i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }} +i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" "{{200.3 | percent : 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js index dc485cfdf2..cc28696761 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts"
+.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" "
" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelem // SOURCE: "/interpolation_with_pipe.ts"
' +.ɵɵelem // SOURCE: "/interpolation_with_pipe.ts" "
'" … -.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }} +.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" "{{200.3 | percent : 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js index 761a528c34..b0ba311b3d 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js @@ -1,15 +1,15 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_for_simple.ts"
+i0.ɵɵelementEnd() // SOURCE: "/ng_for_simple.ts" "
" … -i0.ɵɵadvance(1) // SOURCE: "/ng_for_simple.ts" {{ item }} +i0.ɵɵadvance(1) // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_simple.ts" {{ item }} +i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts"
\ No newline at end of file +("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" "index as i; trackBy: trackByFn\">" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js index 21ed2ffa86..b359a1d8fa 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js @@ -1,15 +1,15 @@ -.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_for_simple.ts"
' +.ɵɵelem // SOURCE: "/ng_for_simple.ts" "
'" … -.ɵɵadvance(1);\n // SOURCE: "/ng_for_simple.ts" {{ item }} +.ɵɵadvance(1);\n // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -.ɵɵtextInterpolate(item_r1);\n }\n}\n\n // SOURCE: "/ng_for_simple.ts" {{ item }} +.ɵɵtextInterpolate(item_r1);\n }\n}\n\n // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts"
\ No newline at end of file +.ɵɵproperty("ngForOf", ctx.items)("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" "of items; index as i; trackBy: trackByFn\">" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js index 2076ca6260..51f41745f6 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js @@ -1,4 +1,4 @@ -i0.ɵɵtext(0) // SOURCE: "/ng_for_templated.ts" {{ item }} +i0.ɵɵtext(0) // SOURCE: "/ng_for_templated.ts" "{{ item }}" … // TODO - map the bindings better -i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_templated.ts" {{ item }} \ No newline at end of file +i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_templated.ts" "{{ item }}" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js index c48b7d422b..038c0f1b2b 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js @@ -1,5 +1,5 @@ -.ɵɵtext(0);\n }\n\n if (rf & 2) {\n const item_r1 = ctx.$implicit;\n // SOURCE: "/ng_for_templated.ts" {{ item }}` +.ɵɵtext(0);\n }\n\n if (rf & 2) {\n const item_r1 = ctx.$implicit;\n // SOURCE: "/ng_for_templated.ts" "{{ item }}`" … // TODO - map the bindings better // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵtextInterpolate(item_r // SOURCE: "/ng_for_templated.ts" {{ item }}` \ No newline at end of file +.ɵɵtextInterpolate(item_r // SOURCE: "/ng_for_templated.ts" "{{ item }}`" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js index 98c6dd10d6..a30476fcc3 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js @@ -1,11 +1,11 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_simple.ts"
+i0.ɵɵelementEnd() // SOURCE: "/ng_if_simple.ts" "
" … -i0.ɵɵtextInterpolate(ctx_r0.name) // SOURCE: "/ng_if_simple.ts" {{ name }} +i0.ɵɵtextInterpolate(ctx_r0.name) // SOURCE: "/ng_if_simple.ts" "{{ name }}" … -i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts"
' +.ɵɵelem // SOURCE: "/ng_if_simple.ts" "
'" … -.ɵɵtextInterpolate(ctx_r0.name);\n }\n}\n\n // SOURCE: "/ng_if_simple.ts" {{ name }} +.ɵɵtextInterpolate(ctx_r0.name);\n }\n}\n\n // SOURCE: "/ng_if_simple.ts" "{{ name }}" … -.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts"
+.ɵɵproperty("ngIf", ctx.showMessage()) // SOURCE: "/ng_if_simple.ts" "ngIf="showMessage()\">" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js index a10cd5ce18..531189a2f1 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js @@ -1,7 +1,7 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_templated.ts"
+i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_templated.ts" "
" … // TODO - map the bindings better -i0.ɵɵelementEnd() // SOURCE: "/ng_if_templated.ts"
+i0.ɵɵelementEnd() // SOURCE: "/ng_if_templated.ts" "
" … // TODO: the `ctx_r...` appears to be dependent upon previous tests!!! // TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'}); diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js index c00684bc83..1a7c24f8b3 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js @@ -1,8 +1,8 @@ -.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_templated.ts"
+.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_templated.ts" "
" … // TODO - map the bindings better // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelementEnd();\n // SOURCE: "/ng_if_templated.ts"
\n +.ɵɵelementEnd();\n // SOURCE: "/ng_if_templated.ts" "
\n " … // TODO: the `ctx_r...` appears to be dependent upon previous tests!!! // TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'}); diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js index eb7e90c3bd..45cd0d4d87 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js @@ -1,11 +1,11 @@ -i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" " diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js index 850d425921..770917fa4a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js @@ -1,13 +1,13 @@ -.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" ` +.ɵɵelement // SOURCE: "/output_binding_complex.ts" "`" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js index 5621aac266..f1d2bb62b4 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js @@ -1,8 +1,8 @@ … -i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" " diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js index 101323ada5..eb41b51c55 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js @@ -1,9 +1,9 @@ … -.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" ' +.ɵɵelement // SOURCE: "/output_binding_longhand.ts" "'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js index 64bffc962d..a8ca0da9f3 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js @@ -1,9 +1,9 @@ -i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" " \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js index d0500d3147..7352929705 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js @@ -1,10 +1,10 @@ -.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" ' \ No newline at end of file +.ɵɵelement // SOURCE: "/output_binding_simple.ts" "'" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js index cd61a51d1e..4fc1c50e21 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js @@ -1,11 +1,11 @@ -i0.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts"

+i0.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" "

" … -i0.ɵɵprojection(1) // SOURCE: "/projection.ts" +i0.ɵɵprojection(1) // SOURCE: "/projection.ts" "" … -i0.ɵɵelementEnd() // SOURCE: "/projection.ts"

+i0.ɵɵelementEnd() // SOURCE: "/projection.ts" "" … -i0.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts"
+i0.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" "
" … -i0.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" +i0.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" "" … -i0.ɵɵelementEnd() // SOURCE: "/projection.ts"
+i0.ɵɵelementEnd() // SOURCE: "/projection.ts" "
" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js index 0185dc6017..21adf57734 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js @@ -1,11 +1,11 @@ -.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts"

+.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" "

" … -.ɵɵprojection(1) // SOURCE: "/projection.ts" +.ɵɵprojection(1) // SOURCE: "/projection.ts" "" … -.ɵɵelementEnd() // SOURCE: "/projection.ts"

\n +.ɵɵelementEnd() // SOURCE: "/projection.ts" "\n " … -.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts"
+.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" "
" … -.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" +.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" "" … -.ɵɵelem // SOURCE: "/projection.ts"
` +.ɵɵelem // SOURCE: "/projection.ts" "
`" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js index 3e3d11b673..1bb28e8308 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js @@ -1,5 +1,5 @@ -i0.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts"

+i0.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" "

" … -i0.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1 +i0.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" "Heading 1" … -i0.ɵɵelementEnd() // SOURCE: "/simple_element.ts"

\ No newline at end of file +i0.ɵɵelementEnd() // SOURCE: "/simple_element.ts" "" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js index f17d38c8f1..9f43aafb64 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts"

+.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" "

" … -.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1 +.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" "Heading 1" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵele // SOURCE: "/simple_element.ts"

' \ No newline at end of file +.ɵɵele // SOURCE: "/simple_element.ts" "'" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js index bca96455fc..d5bea639d4 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js @@ -1,6 +1,6 @@ -i0.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" ' +.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_longhand.ts" "bindon-ngModel=\"name\">'" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelementEnd() // SOURCE: "/two_way_binding_longhand.ts" ' +.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_simple.ts" "[(ngModel)]=\"name\">'" … -.ɵɵelementEnd() // SOURCE: "/two_way_binding_simple.ts" +i0.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" "
" … -i0.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test +i0.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" "this is a test" … -i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
+i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "
" … -i0.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts"
+i0.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" "
" … -i0.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +i0.ɵɵtext(3) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" … -i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
+i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "
" … // NOTE: Update mode -i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js index 27e57418f5..a3d5c94702 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js @@ -1,16 +1,16 @@ // NOTE: Creation mode -.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts"
+.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" "
" … -.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test +.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" "this is a test" … -.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
+.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "
" … -.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts"
+.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" "
" … -.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +.ɵɵtext(3) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelem // SOURCE: "/update_mode.ts"
' +.ɵɵelem // SOURCE: "/update_mode.ts" "
"' … // NOTE: Update mode -.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js index 92de070684..4cc86d92fd 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js @@ -1 +1 @@ -i0.ɵɵelement(0, "hr") // SOURCE: "/void_element.ts"
\ No newline at end of file +i0.ɵɵelement(0, "hr") // SOURCE: "/void_element.ts" "
" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js index 9b47666e3c..956c328070 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js @@ -1,2 +1,2 @@ // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵel // SOURCE: "/void_element.ts"
' \ No newline at end of file +.ɵɵel // SOURCE: "/void_element.ts" "
'" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts b/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts index 3b3ec91412..420068b329 100644 --- a/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts +++ b/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts @@ -17,7 +17,7 @@ import {SourceFileLoader} from '../../../src/ngtsc/sourcemaps'; * comment that has the following syntax: * * ``` - * // SOURCE: "" + * // SOURCE: "" "" * ``` * * The `path/to/original` path will be absolute within the mock file-system, where the root is the @@ -81,7 +81,7 @@ function extractMappings( const mappings: SegmentMapping[] = []; // capture and remove source mapping info expected = expected.replace( - /^(.*?) \/\/ SOURCE: "([^"]*?)" (.*?)$/gm, + /^(.*?) \/\/ SOURCE: "([^"]*?)" "(.*?)"$/gm, (_, rawGenerated: string, rawSourceUrl: string, rawSource: string) => { // Since segments need to appear on a single line in the expected file, any newlines in the // segment being checked must be escaped in the expected file and then unescaped here before @@ -97,8 +97,8 @@ function extractMappings( } function unescape(str: string): string { - const replacements: Record = {'\\n': '\n', '\\r': '\r', '\\\\': '\\'}; - return str.replace(/\\[rn\\]/g, match => replacements[match]); + const replacements: Record = {'\\n': '\n', '\\r': '\r', '\\\\': '\\', '\\"': '\"'}; + return str.replace(/\\[rn"\\]/g, match => replacements[match]); } /**