Index: tests/phpunit/tests/formatting/Autop.php
===================================================================
--- tests/phpunit/tests/formatting/Autop.php	(revision 29400)
+++ tests/phpunit/tests/formatting/Autop.php	(working copy)
@@ -400,4 +400,38 @@
 
 		$this->assertEquals( $expected, trim( wpautop( $content ) ) );
 	}
+
+	/**
+	 * wpautop() should ignore spaced content in blocks without line breaks
+	 *
+	 * @ticket 18136
+	 */
+	function test_spacing_in_blocks() {
+		$str = "<div><p>123</p> </div>";
+		$this->assertEquals( "<div>\n<p>123</p>\n </div>", trim( wpautop( $str ) ) );
+	}
+
+	/**
+	 * wpautop() should ignore content without line breaks
+	 *
+	 * @ticket 20444
+	 */
+	function test_unbroken_lines() {
+		$str = "<div><p>Hello world</p><span>WordPress</span></div>";
+		$this->assertEquals( "<div>\n<p>Hello world</p>\n<span>WordPress</span></div>", trim( wpautop( $str ) ) );
+	}
+
+	/**
+	 * wpautop() should correctly pee in blocks
+	 *
+	 * @ticket 27350
+	 */
+	function test_pee_in_divs() {
+		$str = "<div>hello\n<pre>test</pre>\nworld</div>";
+		$this->assertEquals( $str, trim( wpautop( $str ) ) );
+
+		$str = "hello<div>test</div>";
+		$expected = "hello\n<div>test</div>"; // becuase of formatting.php ~ line 391: $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
+		$this->assertEquals( $expected, trim( wpautop( $str ) ) );
+	}
 }
