diff --git a/samples/TagHelperSample.Web/Views/Home/Create.cshtml b/samples/TagHelperSample.Web/Views/Home/Create.cshtml
index ac1733679c..96054bb801 100644
--- a/samples/TagHelperSample.Web/Views/Home/Create.cshtml
+++ b/samples/TagHelperSample.Web/Views/Home/Create.cshtml
@@ -48,7 +48,8 @@
@*
tag helper has ContentBehavior.Append -- items render after static options *@
-
+
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/InjectChunkVisitorTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/InjectChunkVisitorTest.cs
index c5e9c2322a..fdc73a475b 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/InjectChunkVisitorTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/InjectChunkVisitorTest.cs
@@ -5,6 +5,7 @@ using System;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler;
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
+using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Xunit;
@@ -149,7 +150,8 @@ MyType1
"MyClass",
"MyNamespace",
string.Empty,
- shouldGenerateLinePragmas: true));
+ shouldGenerateLinePragmas: true),
+ new ParserErrorSink());
}
}
}
\ No newline at end of file
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/ModelChunkVisitorTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/ModelChunkVisitorTest.cs
index a5dbf0cf28..f19d22ce36 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/ModelChunkVisitorTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/ModelChunkVisitorTest.cs
@@ -5,6 +5,7 @@ using System;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler;
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
+using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Xunit;
@@ -105,7 +106,8 @@ Environment.NewLine +
"MyClass",
"MyNamespace",
string.Empty,
- shouldGenerateLinePragmas: true));
+ shouldGenerateLinePragmas: true),
+ new ParserErrorSink());
}
}
}
\ No newline at end of file
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs
index d562a524b1..9f86c9362c 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs
@@ -55,9 +55,9 @@ namespace Microsoft.AspNet.Mvc.Razor
BuildLineMapping(documentAbsoluteIndex: 139,
documentLineIndex: 4,
documentCharacterIndex: 17,
- generatedAbsoluteIndex: 2058,
- generatedLineIndex: 52,
- generatedCharacterIndex: 107,
+ generatedAbsoluteIndex: 2105,
+ generatedLineIndex: 53,
+ generatedCharacterIndex: 95,
contentLength: 3)
};
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs
index b01972df75..372c400d38 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs
@@ -3,6 +3,7 @@
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
+using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.TagHelpers;
using Xunit;
@@ -31,14 +32,16 @@ namespace Microsoft.AspNet.Mvc.Razor
rootNamespace: string.Empty,
sourceFile: string.Empty,
shouldGenerateLinePragmas: true);
- var context = new CodeBuilderContext(generatorContext);
+ var errorSink = new ParserErrorSink();
+ var context = new CodeBuilderContext(generatorContext, errorSink);
// Act
renderer.RenderAttributeValue(attributeDescriptor, writer, context,
(codeWriter) =>
{
codeWriter.Write("MyValue");
- });
+ },
+ complexValue: false);
// Assert
Assert.Equal(expectedValue, writer.GenerateCode());
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/DesignTime/ModelExpressionTagHelper.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/DesignTime/ModelExpressionTagHelper.cs
index b58efdfe2d..91c93af0d2 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/DesignTime/ModelExpressionTagHelper.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/DesignTime/ModelExpressionTagHelper.cs
@@ -50,7 +50,11 @@
public override async Task ExecuteAsync()
{
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper();
- __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now);
+#line 5 "TestFiles/Input/ModelExpressionTagHelper.cshtml"
+__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now);
+
+#line default
+#line hidden
}
#pragma warning restore 1998
}
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/Runtime/ModelExpressionTagHelper.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/Runtime/ModelExpressionTagHelper.cs
index a0ad0bf866..b71325c6c3 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/Runtime/ModelExpressionTagHelper.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/Runtime/ModelExpressionTagHelper.cs
@@ -48,7 +48,11 @@ namespace Asp
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", "test");
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper();
__tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper);
- __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now);
+#line 5 "TestFiles/Input/ModelExpressionTagHelper.cshtml"
+__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now);
+
+#line default
+#line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/Compilation/RazorCompilationServiceTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/Compilation/RazorCompilationServiceTest.cs
index 9cf4fb9899..fce9da1018 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Test/Compilation/RazorCompilationServiceTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Test/Compilation/RazorCompilationServiceTest.cs
@@ -6,6 +6,7 @@ using System.Linq;
using Microsoft.AspNet.FileSystems;
using Microsoft.AspNet.Razor;
using Microsoft.AspNet.Razor.Generator.Compiler;
+using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.TagHelpers;
using Moq;
@@ -49,10 +50,12 @@ namespace Microsoft.AspNet.Mvc.Razor.Test
public void Compile_ReturnsFailedResultIfParseFails()
{
// Arrange
+ var errorSink = new ParserErrorSink();
+ errorSink.OnError(new RazorError("some message", 1, 1, 1, 1));
var generatorResult = new GeneratorResults(
new Block(new BlockBuilder { Type = BlockType.Comment }),
Enumerable.Empty(),
- new RazorError[] { new RazorError("some message", 1, 1, 1, 1) },
+ errorSink,
new CodeBuilderResult("", new LineMapping[0]),
new CodeTree());
var host = new Mock();
@@ -87,7 +90,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Test
var generatorResult = new GeneratorResults(
new Block(new BlockBuilder { Type = BlockType.Comment }),
Enumerable.Empty(),
- new RazorError[0],
+ new ParserErrorSink(),
new CodeBuilderResult(code, new LineMapping[0]),
new CodeTree());
var host = new Mock();
@@ -119,7 +122,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Test
return new GeneratorResults(
new Block(new BlockBuilder { Type = BlockType.Comment }),
Enumerable.Empty(),
- new RazorError[0],
+ new ParserErrorSink(),
new CodeBuilderResult("", new LineMapping[0]),
new CodeTree());
}
diff --git a/test/WebSites/MvcTagHelpersWebSite/Views/MvcTagHelper_Home/Order.cshtml b/test/WebSites/MvcTagHelpersWebSite/Views/MvcTagHelper_Home/Order.cshtml
index cf5c51fd0c..1bac052993 100644
--- a/test/WebSites/MvcTagHelpersWebSite/Views/MvcTagHelper_Home/Order.cshtml
+++ b/test/WebSites/MvcTagHelpersWebSite/Views/MvcTagHelper_Home/Order.cshtml
@@ -29,7 +29,8 @@
-
+ @{ var @object = "multiple"; }
+