Index: tests/phpunit/tests/shortcode.php
===================================================================
--- tests/phpunit/tests/shortcode.php	(revision 26287)
+++ tests/phpunit/tests/shortcode.php	(working copy)
@@ -310,6 +310,15 @@
 	/**
 	 * @ticket 14050
 	 */
+	function test_shortcode_unautop_xhtml() {
+		// a blank line is added at the end, so test with it already there
+		$test_string = "[footag /]\n";
+		$this->assertEquals( $test_string, shortcode_unautop( wpautop( $test_string ) ) );
+	}
+
+	/**
+	 * @ticket 14050
+	 */
 	function test_multiple_shortcode_unautop() {
 		// a blank line is added at the end, so test with it already there
 		$test_string = "[footag]\n[footag]\n";
@@ -318,6 +327,47 @@
 	}
 
 	/**
+	 * @ticket 14050
+	 */
+	function test_shortcode_unautop_multiline() {
+		// test a sample html structure
+		$test_string = <<<EOF
+<h1>Fun, safe, small group tours &amp; no roughing it</h1>
+[footag]
+<p>Enjoy guided day walks in extraordinary natural areas. Return to comfortable accommodation and delicious meals each evening. No heavy backpack, no camping.</p>
+[/footag]
+
+EOF;
+		$actual = shortcode_unautop( wpautop( $test_string ) );
+		$this->assertEquals( $test_string, $actual );
+	}
+
+	/**
+	 * @ticket 14050
+	 */
+	function test_shortcode_unautop_attributes() {
+		// a blank line is added at the end, so test with it already there
+		$test_string = "[footag id=\"2\" class=\"bar\"]\n";
+		$actual = shortcode_unautop( wpautop( $test_string ) );
+		$this->assertEquals( $test_string, $actual );
+	}
+
+	/**
+	 * @ticket 14050
+	 */
+	function test_shortcode_unautop_attributes_multiline() {
+		// a blank line is added at the end, so test with it already there
+		$test_string = <<<EOF
+[footag id="2" class="bar"]
+<p>Enjoy guided day walks in extraordinary natural areas. Return to comfortable accommodation and delicious meals each evening. No heavy backpack, no camping.</p>
+[/footag]
+
+EOF;
+		$actual = shortcode_unautop( wpautop( $test_string ) );
+		$this->assertEquals( $test_string, $actual );
+	}
+
+	/**
 	 * @ticket 10326
 	 */
 	function test_strip_shortcodes() {
