Browse files

Fixed tests related to self closing tags on non-void elements

  • Loading branch information...
1 parent be654c9 commit 4f66b9c3d29a0efe136318eefea128fb01d90f39 @RobertTheGrey RobertTheGrey committed Nov 13, 2012
View
2 src/Spark.Tests/Bindings/BindingExecutionTester.cs
@@ -126,7 +126,7 @@ public void BindingRefersToAttributeWithMixedCodeAndTextWithAttributeNotSupplied
_viewFolder.Add(Path.Combine("home", "index.spark"), @"<p><hello /></p><macro name='World' beta='string'>success ${beta}!</macro>");
var contents = Render("index");
- Assert.That(contents, Is.EqualTo(@"<p><hello/></p>"));
+ Assert.That(contents, Is.EqualTo(@"<p><hello></hello></p>"));
}
[Test]
View
2 src/Spark.Tests/ImportAndIncludeTester.cs
@@ -206,7 +206,7 @@ public void UsingXmlns()
{Path.Combine("lib", "other.spark"), "other file"}
}, Path.Combine("including", "index.spark"));
var contents = view.RenderView();
- Assert.AreEqual("<p xmlns:x='http://www.w3.org/2001/XInclude\'><include/>other file</p>", contents);
+ Assert.AreEqual("<p xmlns:x='http://www.w3.org/2001/XInclude\'><include></include>other file</p>", contents);
}
[Test]
View
14 src/Spark.Tests/Spark.Tests.Views/Home/ConditionalAttributeDelimitedBySpaces.spark
@@ -1,13 +1,13 @@
-<h1 class="one?{true} two?{false} three?{true}"/>
+<h1 class="one?{true} two?{false} three?{true}"></h1>
-<h2 class="one?{false} two?{false} three?{false}"/>
+<h2 class="one?{false} two?{false} three?{false}"></h2>
-<h3 class="one?{false} two three"/>
+<h3 class="one?{false} two three"></h3>
-<h4 class="one two?{false} three"/>
+<h4 class="one two?{false} three"></h4>
-<h5 class="one two three?{false}"/>
+<h5 class="one two three?{false}"></h5>
-<h6 class="one&two<three?{false}"/>
+<h6 class="one&two<three?{false}"></h6>
-<h7 class="one&two<three?{true}"/>
+<h7 class="one&two<three?{true}"></h7>
View
2 src/Spark.Tests/Spark.Tests.Views/Home/preserveDoubleQuotes.spark
@@ -1 +1 @@
-<tag attr="something; other='value1, value2'" />
+<img attr="something; other='value1, value2'" />
View
2 src/Spark.Tests/Spark.Tests.Views/Home/preserveSingleQuotes.spark
@@ -1 +1 @@
-<tag attr='something; other="value1, value2"' />
+<img attr='something; other="value1, value2"' />
View
6 src/Spark.Tests/Spark.Tests.Views/Home/relativeapplicationpaths.spark
@@ -1,6 +1,6 @@
<div if="true">
- <img src="~/content/images/etc.png"/>
- <script src="~/content/js/${'etc.js'}"/>
- <p class="~/blah.css"/>
+ <img src="~/content/images/etc.png" />
+ <script src="~/content/js/${'etc.js'}"></script>
+ <p class="~/blah.css"></p>
</div>
View
22 src/Spark.Tests/SparkViewFactoryTester.cs
@@ -550,8 +550,8 @@ public void RelativeApplicationPaths()
Assert.That(content, Contains.InOrder(
"<img src=\"/TestApp/content/images/etc.png\"/>",
- "<script src=\"/TestApp/content/js/etc.js\"/>",
- "<p class=\"~/blah.css\"/>"));
+ "<script src=\"/TestApp/content/js/etc.js\"></script>",
+ "<p class=\"~/blah.css\"></p>"));
}
[Test]
@@ -980,13 +980,13 @@ public void ConditionalAttributeDelimitedBySpaces()
Assert.IsFalse(content.Contains("broken"));
Assert.That(content, Contains.InOrder(
- "<h1 class=\"one three\"/>",
- "<h2/>",
- "<h3 class=\" two three\"/>",
- "<h4 class=\"one three\"/>",
- "<h5 class=\"one two\"/>",
- "<h6/>",
- "<h7 class=\"one&two<three\"/>"));
+ "<h1 class=\"one three\"></h1>",
+ "<h2></h2>",
+ "<h3 class=\" two three\"></h3>",
+ "<h4 class=\"one three\"></h4>",
+ "<h5 class=\"one two\"></h5>",
+ "<h6></h6>",
+ "<h7 class=\"one&two<three\"></h7>"));
}
@@ -1260,7 +1260,7 @@ public void PreserveSingleQuotes()
string content = sb.ToString();
- Assert.That(content, Is.EqualTo(@"<tag attr='something; other=""value1, value2""'/>"));
+ Assert.That(content, Is.EqualTo(@"<img attr='something; other=""value1, value2""'/>"));
}
[Test]
@@ -1273,7 +1273,7 @@ public void PreserveDoubleQuotes()
string content = sb.ToString();
- Assert.That(content, Is.EqualTo(@"<tag attr=""something; other='value1, value2'""/>"));
+ Assert.That(content, Is.EqualTo(@"<img attr=""something; other='value1, value2'""/>"));
}
View
32 src/Spark.Tests/VisualBasicViewTester.cs
@@ -324,28 +324,28 @@ public void ContentSetChunk()
[Test]
public void ConditionalAttributes()
{
- _viewFolder.Add(Path.Combine("vbhome", "index.spark"), @"<div class=""""/>
-<div class=""foo""/>
+ _viewFolder.Add(Path.Combine("vbhome", "index.spark"), @"<img class=""""/>
+<img class=""foo""/>
-<div class=""foo?{True}""/>
-<div class=""foo?{False}""/>
+<img class=""foo?{True}""/>
+<img class=""foo?{False}""/>
-<div class=""foo?{True} bar?{True}""/>
-<div class=""foo?{True} bar?{False}""/>
-<div class=""foo?{False} bar?{True}""/>
-<div class=""foo?{False} bar?{False}""/>");
+<img class=""foo?{True} bar?{True}""/>
+<img class=""foo?{True} bar?{False}""/>
+<img class=""foo?{False} bar?{True}""/>
+<img class=""foo?{False} bar?{False}""/>");
var contents = Render("index");
- Assert.That(contents.Trim(), Is.EqualTo(@"<div class=""""/>
-<div class=""foo""/>
+ Assert.That(contents.Trim(), Is.EqualTo(@"<img class=""""/>
+<img class=""foo""/>
-<div class=""foo""/>
-<div/>
+<img class=""foo""/>
+<img/>
-<div class=""foo bar""/>
-<div class=""foo""/>
-<div class="" bar""/>
-<div/>"));
+<img class=""foo bar""/>
+<img class=""foo""/>
+<img class="" bar""/>
+<img/>"));
}
[Test]

0 comments on commit 4f66b9c

Please sign in to comment.