Commit 7d515e91c0c72db879879692d5124ad97d790e00

Golmote 2015-08-19T00:39:04

Add test for directives in ASP.NET

diff --git a/tests/languages/csharp+aspnet/directive_feature.test b/tests/languages/csharp+aspnet/directive_feature.test
new file mode 100644
index 0000000..9eaa005
--- /dev/null
+++ b/tests/languages/csharp+aspnet/directive_feature.test
@@ -0,0 +1,71 @@
+<%: Page.Title %>
+<%#:Item.ProductID%>
+<a href="ProductDetails.aspx?productID=<%#:Item.ProductID%>">
+<% if(foo) { %>
+	foobar
+<% } %>
+
+----------------------------------------------------
+
+[
+	["directive tag", [
+		["directive tag", "<%:"],
+		" Page",
+		["punctuation", "."],
+		"Title ",
+		["directive tag", "%>"]
+	]],
+
+	["directive tag", [
+        ["directive tag", "<%#:"],
+        "Item",
+        ["punctuation", "."],
+        "ProductID",
+        ["directive tag", "%>"]
+    ]],
+
+    ["tag", [
+        ["tag", [
+            ["punctuation", "<"],
+            "a"
+        ]],
+        ["attr-name", [
+            "href"
+        ]],
+        ["attr-value", [
+            ["punctuation", "="],
+            ["punctuation", "\""],
+            "ProductDetails.aspx?productID",
+            ["punctuation", "="],
+            ["directive tag", [
+                ["directive tag", "<%#:"],
+                "Item",
+		        ["punctuation", "."],
+		        "ProductID",
+		        ["directive tag", "%>"]
+            ]],
+            ["punctuation", "\""]
+        ]],
+        ["punctuation", ">"]
+    ]],
+
+    ["directive tag", [
+        ["directive tag", "<%"],
+        ["keyword", "if"],
+        ["punctuation", "("],
+        "foo",
+        ["punctuation", ")"],
+        ["punctuation", "{"],
+        ["directive tag", "%>"]
+    ]],
+    "\r\n\tfoobar\r\n",
+    ["directive tag", [
+        ["directive tag", "<%"],
+        ["punctuation", "}"],
+        ["directive tag", "%>"]
+    ]]
+]
+
+----------------------------------------------------
+
+Checks for directives.
\ No newline at end of file