+2009-08-26 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx
+
2009-08-25 Marek Habersack <mhabersack@novell.com>
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/NewlineInCodeExpression.aspx \
Test/mainsoft/NunitWebResources/DuplicateControlsInClientComment.aspx \
Test/mainsoft/NunitWebResources/TagsNestedInClientTag.aspx \
- Test/mainsoft/NunitWebResources/ConditionalClientComments.aspx
+ Test/mainsoft/NunitWebResources/ConditionalClientComments.aspx \
+ Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx
RESX_DIST = resources/TranslationResources.resx
ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
public int get_token ()
{
if (hasPutBack) {
- PutBackItem pbi = putBackBuffer.Pop () as PutBackItem;
+ PutBackItem pbi;
+ if (verbatim) {
+ pbi = putBackBuffer.Pop () as PutBackItem;
+ string value = pbi.Value;
+ switch (value.Length) {
+ case 0:
+ // do nothing, CurrentToken will be used
+ break;
+
+ case 1:
+ pbi = new PutBackItem (String.Empty, pbi.Position, (int)value [0], false);
+ break;
+
+ default:
+ pbi = new PutBackItem (value, pbi.Position, (int)value [0], false);
+ break;
+ }
+ } else
+ pbi = putBackBuffer.Pop () as PutBackItem;
+
hasPutBack = putBackBuffer.Count > 0;
position = pbi.Position;
have_value = false;
+2009-08-26 Marek Habersack <mhabersack@novell.com>
+
+ * AspTokenizer.cs: when there's put back record and we're in
+ verbatim mode, get_token must be careful with what it returns - it
+ can't return Token.* values, instead it should look at Value and
+ retrieve the next token from it. Fixes bug #400807
+
2009-08-25 Marek Habersack <mhabersack@novell.com>
* AspGenerator.cs: correctly parse server-side tags nested in
+2009-08-26 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControlCompilerTest.cs: added test for bug #400807
+
2009-08-25 Marek Habersack <mhabersack@novell.com>
* TemplateControlCompilerTest.cs: added test for bug #323719
WebTest.CopyResource (GetType (), "LinkInHeadWithEmbeddedExpression.aspx", "LinkInHeadWithEmbeddedExpression.aspx");
WebTest.CopyResource (GetType (), "ExpressionInListControl.aspx", "ExpressionInListControl.aspx");
WebTest.CopyResource (GetType (), "PreprocessorDirectivesInMarkup.aspx", "PreprocessorDirectivesInMarkup.aspx");
+ WebTest.CopyResource (GetType (), "OneLetterIdentifierInCodeRender.aspx", "OneLetterIdentifierInCodeRender.aspx");
#endif
}
<![endif]-->";
HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
}
-#endif
+
+ [Test (Description="Bug #400807")]
+ public void OneLetterIdentifierInCodeRender ()
+ {
+ string pageHtml = new WebTest ("OneLetterIdentifierInCodeRender.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = @"bDoR called";
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
+#endif
[Test (Description="Bug #323719")]
public void TagsNestedInClientTag ()
{
--- /dev/null
+<%@ Page Language="C#" %>
+<script runat="server">
+ void DoR ()
+ {
+ Response.Write ("DoR called");
+ }
+</script>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+ <title>Bug #400807</title>
+</head>
+<body>
+
+ <form id="form1" runat="server">
+ <%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><%
+ System.Action r = new Action (DoR);%>
+ <% Response.Write("b");%>
+
+ <% r(); %><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+ </form>
+</body>
+</html>