+2009-07-08 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/PreprocessorDirectivesInMarkup.aspx
+
2009-07-06 Raja R Harinath <harinath@hurrynot.org>
* Makefile (TEST_MCS_FLAGS): Reference SystemWebTestShim.
Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx \
Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx \
Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx \
- Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx
+ Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx \
+ Test/mainsoft/NunitWebResources/PreprocessorDirectivesInMarkup.aspx
RESX_DIST = resources/TranslationResources.resx
ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
bool databinding;
varname = Eat ('=');
databinding = !varname && Eat ('#');
-
+ string odds = tokenizer.Odds;
+
tokenizer.Verbatim = true;
inside_tags = GetVerbatim (tokenizer.get_token (), "%>");
+ if (databinding && odds != null && odds.Length > 0) {
+ databinding = false;
+
+ // We encountered <% #something here %>, this should be passed
+ // verbatim to the compiler
+ inside_tags = '#' + inside_tags;
+ }
+
tokenizer.Verbatim = false;
id = inside_tags;
attributes = null;
if (units.Length == 0 && files.Count == 0 && resources.Count == 0 && options.EmbeddedResources.Count == 0)
return null;
+
+ if (options.IncludeDebugInformation) {
+ string compilerOptions = options.CompilerOptions;
+ if (String.IsNullOrEmpty (compilerOptions))
+ compilerOptions = "/d:DEBUG";
+ else if (compilerOptions.IndexOf ("d:DEBUG", StringComparison.OrdinalIgnoreCase) == -1)
+ compilerOptions += " /d:DEBUG";
+
+ options.CompilerOptions = compilerOptions;
+ }
string filename;
StreamWriter sw = null;
+2009-07-08 Marek Habersack <mhabersack@novell.com>
+
+ * AspParser.cs: GetServerTag mustn't treat <% # ... %> as
+ data-binding directives. Fixes bug #520024
+
+ * AssemblyBuilder.cs: if debugging information is on, append
+ /d:DEBUG to the compiler's command line.
+
2009-06-30 Marek Habersack <mhabersack@novell.com>
* AspGenerator.cs: TextParsed must remove client-side comments
+2009-07-08 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControlCompilerTest.cs: added test for bug #520024
+
2009-07-06 Raja R Harinath <harinath@hurrynot.org>
* TemplateControlCompilerTest.cs (InvalidPropertyBindTest1):
WebTest.CopyResource (GetType (), "ContentPlaceHolderInTemplate.master", "ContentPlaceHolderInTemplate.master");
WebTest.CopyResource (GetType (), "LinkInHeadWithEmbeddedExpression.aspx", "LinkInHeadWithEmbeddedExpression.aspx");
WebTest.CopyResource (GetType (), "ExpressionInListControl.aspx", "ExpressionInListControl.aspx");
+ WebTest.CopyResource (GetType (), "PreprocessorDirectivesInMarkup.aspx", "PreprocessorDirectivesInMarkup.aspx");
#endif
}
string originalHtml = @"<script type=""text/javascript"">alert (escape(""reporting/location?report=ViewsByDate&minDate=minDate&maxDate=maxDate""));</script>";
HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
}
+
+ [Test (Description="Bug #520024")]
+ public void PreprocessorDirectivesInMarkup ()
+ {
+ // Just test if it doesn't throw an exception
+ new WebTest ("PreprocessorDirectivesInMarkup.aspx").Run ();
+ }
#endif
[Test (Description="Bug #517656")]
--- /dev/null
+<%@ Page Language="C#" %>
+<html><head><title>Bug 520024</title></head>
+<body>
+<form runat="server">
+<% #if DEBUG %>
+ Debug mode
+<% #else %>
+ Normal mode
+<% #endif %>
+</form>
+</body>
+</html>